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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Showing results without a joining record

Status
Not open for further replies.

Harr777

Programmer
Sep 25, 2003
71
US
I have a query that should idealy show all of the results from one table and whatever exist in the other.
In other words, not every record in tblOne has a corresponding record in tblTwo. Yet, I need every field in tble need to be listed in the query results.
I don't know if there is an answer for this, short of creating a dummy value in tblTwo on the fly (and I'm not sure where to begin to do that).

Bottom line... is there a way to get query results for records that are not found?

Thanks in advance.

 
Take a look at LEFT JOIN:
SELECT .....
FROM tblOne LEFT JOIN tblTwo ON tblOne.XXXX=tblTwo.YYYY
...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
That was it. I have been creating my queries in Access design view (please do not frawn upon me). I was able to switch to SQL view insert the LEFT JOIN code.
Thanks a lot.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top