Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report Trouble
Message
From
30/12/1999 13:06:32
 
 
To
30/12/1999 12:48:29
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00310435
Message ID:
00310539
Views:
17
>I understand what's being said, and have given another attempt. Does this look better? (I haven't tested it yet):

Are you intending to sum up the bundle field in each datan table? If so this isn't going to do what you want.

If you need the intermediate summations then you can do it in two steps.

SELECT SUM( data1.bundle ) as sumvar FROM lumber!data1 into cursor bundata WHERE siz = szValue and grade = gdValue and length = 2 union all ;
SELECT SUM( data2.bundle ) as sumvar FROM lumber!data2 WHERE siz = szValue and grade = gdValue and length = 2 union all ;
SELECT SUM( data3.bundle ) as sumvar FROM lumber!data3 WHERE siz = szValue and grade = gdValue and length = 2 INTO CURSOR sums

*!* Now you'll see one record with bundle summed for each of the selects
*!* Now take the total

SELECT SUM( sumvar ) FROM sums INTO CURSOR totalsum
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform