Click here to Skip to main content
15,892,737 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
My query is :

SQL
Select Acc_Number,BankDetails,[Address], cast(Acc_Balance AS NUMERIC(15,2))AS [Acc_Balance], Convert(varchar(12),CreatedDate,106) AS [CreatedDate]
FROM WDI_M_BankDetails
WHERE PartnerID=1


This query is working in one schema . But not working in other schemas. Am getting this below error.
Arithmetic overflow error converting money to data type numeric.


Thanks
Hari
Posted
Updated 26-Nov-13 10:31am
v2
Comments
ZurdoDev 26-Nov-13 7:34am    
It's likely coming from cast(Acc_Balance AS NUMERIC(15,2))AS [Acc_Balance]
Bernhard Hiller 26-Nov-13 8:50am    
Must be a very very rich guy. Even Bill Gates' fortune converted to Indian Rupees won't be too big for a NUMERIC(15,2)

1 solution

It is quite often question... Please use SearchBox[^] at the right-top corner of this site.

I would suggest you to read below articles:
Data Type Conversion (Database Engine)[^]
SQL SERVER – Difference and Explanation among DECIMAL, FLOAT and NUMERIC[^]
SQL SERVER – Puzzle – Challenge – Error While Converting Money to Decimal[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900