yadavdep
asked on
Casting is giving error in sql server
I have a column in my sql server table JobCharge Decimal(18,2)
Now I am running this query
Select CAST(JobCharge as DECIMAL(18,15)) from Journal
And I am getting this error - Arithmetic overflow error converting numeric to data type numeric.
I checked the value the in the table and I found out this error is coming with values which has 4 digits before decimal place for example 3000.00
but it works fine with these values 30.00 or 300.00.
I don't know what wrong I am doing here.
Now I am running this query
Select CAST(JobCharge as DECIMAL(18,15)) from Journal
And I am getting this error - Arithmetic overflow error converting numeric to data type numeric.
I checked the value the in the table and I found out this error is coming with values which has 4 digits before decimal place for example 3000.00
but it works fine with these values 30.00 or 300.00.
I don't know what wrong I am doing here.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER