Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL code problem
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Vista
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01331489
Message ID:
01331492
Views:
10
This message has been marked as the solution to the initial question of the thread.
First,
In VFP 8 and later you should put ALL the fields which are not involved in aggregate functions in GROUP BY clause. That is SELECT * is not good. Are you sure you need ALL fields?
Also: The first record from that quesry defines the field length, so IIF(...,..., 0) must be:
sum(IIF(stage="70",desqty,00000000000.00)) && make these zeroes to match the length you need.
In VFP9 you could use CAST() function:
sum(IIF(stage="70", desqty, CAST(0 as N(14,2))) && make these zeroes to match the length you need.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform