Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Crystal SQL select question
Message
De
10/07/2000 00:17:38
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Crystal SQL select question
Divers
Thread ID:
00390089
Message ID:
00390089
Vues:
48
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?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform