09-18-2017 06:43 AM - edited 09-18-2017 06:45 AM
I am doing some calculation like
A= (col1* col2*col3)/(100000*col4);
My value in A is always less than 10,000 but when I am loading this output datasset in the MS SQL table it is giving an error Numeric out of range.
One option is to increase the length of column in SQL table but I am looking for solution - what should I do in data step so that data can be inserted into MS SQL table without getting an error.
The place holder in MS SQL have sufficient length.
Seondly, I also tried using round function in data step but it didnt help.
09-18-2017 06:51 AM
You don't say what the number in col4 is but my guess is that once you multiply that by 100,000 you're exceeding the largest number that SQL Server can hold. A similar thing happened on one system I worked on with ORACLE.
09-18-2017 08:34 AM
Ok, not following. Either it fits, or not. Can't see that this is a SAS problem.
It seems that you either need to fix your data, or your columns definitions.