算术溢出错误将货币转换为数据类型数字。 [英] Arithmetic overflow error converting money to data type numeric.

查看:112
本文介绍了算术溢出错误将货币转换为数据类型数字。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我的查询是:



 选择 Acc_Number,BankDetails,[地址],强制转换(Acc_Balance  AS   NUMERIC (< span class =code-digit> 15 , 2 )) AS  [Acc_Balance] ,转换 varchar  12 ), CreatedDate, 106  AS  [CreatedDate] 
FROM WDI_M_BankDetails
WHERE PartnerID = 1





此查询在一个模式中工作。但不适用于其他模式。我得到以下错误。

算术溢出错误将货币转换为数据类型数字。





谢谢

Hari

解决方案

经常有问题......请使用SearchBox [ ^ ]在本网站的右上角。



我建议你在下面阅读文章:

数据类型转换(数据库引擎) ) [ ^ ]

SQL SERVER - 差异和解释DECIMAL,FLOAT和NUMERIC之间的离子 [ ^ ]

SQL SERVER - 益智 - 挑战 - 将钱转换为十进制时出错 [ ^ ]

Hi All,
My query is :

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

解决方案

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[^]


这篇关于算术溢出错误将货币转换为数据类型数字。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆