Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL cursor question
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
SQL cursor question
Divers
Thread ID:
00448837
Message ID:
00448837
Vues:
56
I have a rpt13.prg which creates a cursor from an SQL statment and then REPORT FORM rpt013a.frx. The result set of the SQL statement returns duplicate customer records because cust_num is not unique in the sales table. But the report has no Detail Section, just a Group Footer section that resets on Customer Number and sums the sales.sal_amt field.

SELECT sales.sal_amt, customer.cust_num, customer.cust_name ;
FROM sales, customer ;
INTO CURSOR rpt013a ;
WHERE customer.cust_num = sales.cust_num

The client now wants a new column on the report, the sum of customer refund amount - refund.ref_amt - for each customer. Customer number is not unique in the refund table.

I am at a lost on how to get the customer refund amount on the report. Any help or ideas would be appreciated.

The above example is greatly simplified, but does explain the basic idea of my need.

Thanks

Brenda
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform