General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Crystal SQL select question
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only