laredo512 Posted August 30, 2004 Posted August 30, 2004 Hi All, Got this issue with SQL decimals. I have 3 variables: decWeight as decimal decCBM as decimal decBox as decimal Until they get inserted into the db, the IDE watch reports them as still being decimals (ex: decWeight 's value = 1200.31D as type decimal). Why does SQL Server round off these values to make them integers ? (The db fields are set to decimals) Thanks for any help you can provide. Quote Laredo512 * using VS.NET Pro 2003 *
*Experts* Nerseus Posted August 30, 2004 *Experts* Posted August 30, 2004 Decimals in SQL Server have two values: precision and scale (or something like that). From the help: Precision Shows the maximum number of digits for values of this column. Scale Shows the maximum number of digits that can appear to the right of the decimal point for values of this column. My guess is that your scale is 0. -ner Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
laredo512 Posted August 30, 2004 Author Posted August 30, 2004 Decimals in SQL Server have two values: precision and scale (or something like that). From the help: My guess is that your scale is 0. -ner doh! Ya I thought of that.... NOT Thanks a bunch Nerseus, I had overlooked that "precise" detail. Quote Laredo512 * using VS.NET Pro 2003 *
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.