General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>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
Previous
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