Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

Right data type

$
0
0

I have table like below

Sale rent
11 Null
22 0
33 33

Data type for Sales and rent is varchar

My query is:

Select

Cast(Sale AS Bigint) AS Sales 

Cast(rent AS Bigint) AS Rents

From Table

Where Cast(Sale AS Bigint)  <> Cast(rent AS Bigint)

For some reason I am not getting table like below( I already tried to change bigint to int)

Sale rent
11 Null
22 0


simam


Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>