|
Posted by Erland Sommarskog on 06/07/05 16:00
(arijitchatterjee123@yahoo.co.in) writes:
> Hi Group,
> I am trying to display the multiplication through this way
> ----------------------
> select 1163436036*100
> ----------------------
> Getting the error
>============================
> Server: Msg 8115, Level 16, State 2, Line 1
> Arithmetic overflow error converting expression to data type int.
>============================
> For that reason I was tried to convert that to nvarchar
> ------------------------
> select convert(numeric(36,2),1163436036*100)
> ------------------------
> But still getting the error
>=============================
> Server: Msg 8115, Level 16, State 2, Line 1
> Arithmetic overflow error converting expression to data type int.
>=============================
> Please help me to solve it out..
You need to convert one of the numbers in the expression to the
target type you want, for instance:
select 1163436036*convert(bigint, 100)
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
[Back to original message]
|