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

Data from Two Tables When One Has No Entry

Status
Not open for further replies.

pbt1234

Technical User
Jun 25, 2004
23
0
0
US
I have a query that pulls new and used tolernace limits for parts from two tables. New tolerances are stored in one table and used tolerances are stored in another table. Information about tolerances can be found in either table by searching for the part number. There is an entry in the new tolerances table for each part. There may or may not be an entry for a part in the used tolerances table. When there is an entry for new and used, the query works fine. When there is no entry in used, the query returns no information. Any suggestions other than create an entry in the used parts table for all parts (what a chore!)?

Thanks in advance,
pbt1234
 
Look at a LEFT JOIN
Code:
Select N.PartNo, N.Tolerence As [New Tolerence],
       U.Tolerence As [Used Tolerence]

From NewTolerences As N LEFT JOIN UsedTolerences As U
     ON N.PartNo = U.PartNo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top