Datatype Conversion

Posted by user87 on Stack Overflow See other posts from Stack Overflow or by user87
Published on 2012-03-24T17:26:27Z Indexed on 2012/03/24 17:29 UTC
Read the original article Hit count: 236

Filed under:
|

I am trying to execute the following Query

select distinct pincode as Pincode,CAST(Date_val as DATE) as Date,
SUM(cast(megh_38 as int)) as 'Postage Realized in Cash',
SUM(cast(megh_39 as int)) as 'MO Commission',
from dbo.arrow_dtp_upg
group by pincode,Date_Val

but I am getting an error "Conversion failed when converting the nvarchar value '82.25' to data type int."

Am I using a wrong data type?

© Stack Overflow or respective owner

Related posts about sql

Related posts about sql-server