Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL cursor question
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
SQL cursor question
Miscellaneous
Thread ID:
00448837
Message ID:
00448837
Views:
55
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
Next
Reply
Map
View

Click here to load this message in the networking platform