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

Finding existence of field in subquery

Status
Not open for further replies.

dmackenzie

Programmer
Feb 5, 2007
1
US
This should be straightforward but I am STUCK! I have multiple tables joined in a query. One of the tables may or may not have data...if it does i want to get it..if not, i still want other fields from other tables.

UGG hard to explain. Lets say i have an order header table. Each order can have multiple items, so there is a table for that. Each one of these items may have additional detail messages in yet another table. I want the query to bring back the header info, item info, and detail messages IF they exist..if they do not exist just give me header and line items.
 
Use LEFT joins instead of INNER joins.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top