Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Left outer join returns no data
Message
De
24/04/2000 08:35:59
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00362542
Message ID:
00362699
Vues:
25
>from client1!patient, client1!recall as rec ;
>left join client1!transact as tns on tns.id_patient= patient.id_pati ;
>left join system!carrier as car on car.code = patient.code_primary_carrier ;
>left join system!source as src on Src.code = patient.intake_aa ;
>where patient.id_pati = rec.id_patient and patient.id_pati = 101182
>

The problem is that you can't mix and match doing joins with WHERE and doing joins with JOIN. You have two tables listed with a comma between them after FROM before you started putting the JOINs. You can't do that. Use all JOINs or all the joins in the WHERE clause.

A couple of other notes:

- There's no need for the keyword AS to provide a local alias for a table. Just list the table name and the local alias, like this:

client!recall rec

- In the field list, check out the NVL() function for all those places where you have IIF(ISNULL(...), ...)

- You shouldn't have to open the tables first. That's probably related to the others issues with the joins. Once you get the joins specified properly, that problem should go away.

Tamar
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform