Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Summing up data with null values
Message
From
01/05/2005 13:59:06
Randy Wessels
Screentek Business Solutions, Llc.
Phoenix, Arizona, United States
 
 
To
01/05/2005 13:27:07
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01010013
Message ID:
01010021
Views:
27
The NVL worked perfect. Thanks everyone for the help.

>Hello,
>
>either use:
>
>IF (NVL(curcursor.CURRENT,0) + NVL(tdcursor.thirtydays,0) + NVL(sdcursor.sixtydays,0) + NVL(npcursor.ninetyplus,0) + NVL(custdetail.deposit)) != 0
>
>or exclude NULL's in the first place:
>
>SELECT NVL(SUM(totaldue-totalpaid),0) AS CURRENT FROM tempinvpostless30 INTO CURSOR curcursor WHERE ALLTRIM(custno) == ALLTRIM(scancust.custno)
>
>...
>
>besides this, assuming custno is the tables primary/foreign key
>you're better of not using ALLTRIM in the SELECT statements since this isn't optimizable by rushmore
>
>Regards
>Christian
Previous
Reply
Map
View

Click here to load this message in the networking platform