Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL
Message
From
23/05/2001 04:37:37
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
SQL
Miscellaneous
Thread ID:
00510223
Message ID:
00510223
Views:
43
I have a patient table and a visits table.
Patient
Patient_ID
Name

Visit
Patient ID
Date
Treatment Type
Amt

I wish to write a SQL statement that will generate a cursor as follows

Patient_ID, Name, Amt_1, Amt_2, Amt_3

where amt_1,amt_2,amt_3 are expenses incurred for treatment type 1, 2 & 3 respectively. The output is actually sort of crosstab. All help appreciated. Thanks.
Best Regards
Next
Reply
Map
View

Click here to load this message in the networking platform