Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trouble selecting data from tables into another table
Message
 
To
20/11/1998 10:33:03
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00159721
Message ID:
00159732
Views:
25
>Hello,
>
>I've just started using VFP 6.0 and run into a problem :
>
>I desperately want to make a small report on 18 tables, all with different structures.
>The user can select as many tables as he/she wants (upto 18) in a Form and then the program will make a report out of the selected tables. The report will show data from 2 or 3 fields from each selected table.
>
>The problem is:
>How can I get the data from the selected tables into one table which I can use for the report?
>
>Could you please give me some code and a simple answer, since I'm a novice VFP user.
>
>Thank you very much for your time and answer in advance.....


Remco, the usual way for this is to create the report cursor from the SQL SELECT statement. Your tables should have the key fields which will identify the records for selection. Something similar to:

SELECT customer .company, orders.order_date, orders.shipped_on ;
FROM customer , orders ;
WHERE customer.cust_id = orders.cust_id ;
INTO cursor _creport

Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform