Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Crystal SQL select question
Message
From
10/07/2000 00:17:38
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Crystal SQL select question
Miscellaneous
Thread ID:
00390089
Message ID:
00390089
Views:
49
I'm trying to help a friend that is struggling with Crystal and SQL - and I'm not a Crystal user.

Data structure:
Table1 "Household data"
Table1.id (household data)
Table1.address
Table1.city ...

Table2 "Payment history"
Table2.id
Table2.payment_date
Table2.payment_amount
...

Table3 "Contact Info"
Table3.id
Table3.family_member_last_name
Table3.family_member_first_name
...

Linking field (obviously) is ID.

We need a select which returns a record for each id,payment_date,payment_amount,family_member_last_name. We need same number of records for each ID as exists in Table2.

We don't want multiple sets of payment_amount caused by having more than one family member in the Table3 contact info.

Currently the SQL selects we've created with Crystal are returning repeatitive sets of payment info - repeating the payment info for each family member.

Thought that DISTINCT might solve our problem but Crystal SQL editor gives syntax error when we try to insert it.

So- can a SQL guru come to our aid?
Next
Reply
Map
View

Click here to load this message in the networking platform