Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How many files can I left join to one file?

Status
Not open for further replies.

ldalessio

Programmer
Apr 16, 2008
23
US
I would just like to clarify my programming. In my report, I have (1)primary file that I would like to link with (3) additional files. All links would be left-outer joined. This is OK as long as I don't use a filter in my record selection. Correct?
Thank you for the help.
 
If I understand your question, you can use a filter against a field in the LEFT OUTER JOINed tables but have to check for NULLS first.

i.e. WHERE (ISNULL(FIELD-a) OR FIELD-a = PARAMETER-a)





 
You can use a left join FROM the primary table TO multiple tables, but you should ONLY add selection criteria on the primary table. Addressing nulls is insufficient since any records that were NOT null and did NOT meet the selection criteria would be eliminated, effectively undoing the left join.

There is a method where you can use a left join in a command and add selection criteria in the FROM clause instead of the WHERE clause which allows the left join to still be honored.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top