Error in the cast statement
For the below code I am getting the error " Msg 8114, Level 16, State 5, Line 1 Error converting data type nvarchar to float" can someone help me in getting the below fixed.
Thanks!.
Select A.FISCAL_YEAR,
A.FISCAL_QUARTER,
A.REG as REGION,
A.DISTRIBUTOR,
Cast(sum(A.sales-A.discount)/1000000 as float) as sale,
Cast(sum(A.Sales_t-A.discount_t)/1000000 as float) as sales_t
from dbo.EG_WW_INDIRECT_DATA A
where a.FISCAL_YEAR in ('FY14','FY15','FY16')
group by A.FISCAL_YEAR,
A.FISCAL_QUARTER,
A.REG,
A.DISTRIBUTOR
Subject
Views
Written By
Posted
Error in the cast statement
1355
January 05, 2016 10:30PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.