Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Problem
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
SQL Problem
Miscellaneous
Thread ID:
00028660
Message ID:
00028660
Views:
79
I was doing a simple SQL with SUMs and got a numeric overflow error at random intervals. The code was:

SELECT sum(lineitem) as linetotal, sum(iif(taxable, lineitem, 0)) as taxtotal from MyTable into cursor MyCursor

The problem was the sum(iif(taxable, lineitem,0)) which worked about 95% of the time and gave me the numeric overflow error the remaining times. I presume I have to set the size of the numeric field, as must be done with variable length character fields, but don't know how.

All help gratefully accepted.

TIA
Barbara
Barbara Paltiel, Paltiel Inc.
Next
Reply
Map
View

Click here to load this message in the networking platform