Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Report Trouble
Message
De
31/12/1999 05:06:34
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
30/12/1999 15:22:39
Jimmy Ditta
Twin City Electronics
Monroe, Louisiane, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00310435
Message ID:
00310847
Vues:
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
>
>
>no, not quite. In a nutshell, I have a form with 8 rows of comboboxes 5 comboboxes. combo 1 for each row is # of bundles, combo 2 is size of board (example: 2x4), combo 3 is length, and so on. Each row of combos has it's corresponding table; therefore 8 tables. The tables are linked by a P.O. number. IOW record 571 in table 1 goes with the same order as record 571 in table 2, and so on.
>
>I need a report that generates as many rows as there are records, each row showing its corresponding po#, how many 2ft. bundles in the order, how many 4ft. bundles in the order, how many 6ft. bundles.......up to 20ft. bundles.
>
>The database is in this form out of necessity due to calculations in other parts of the program.


Jimmy,
Sounds like you already have one-to-one relation between them. You might even forget SQL selecting and just relate them for the report.
If you pack and send the tables + frx + explanation what you want to achieve I promise I'll spare one hour for you. Thanks.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform