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

select using 2 different tables 1

Status
Not open for further replies.

TGJ

Programmer
Jan 31, 2005
64
CA
Hi, ok I have a bit of a problem. What I need to do is select info from table A only if that info is not in table B. Here is what I have:

SELECT DISTINCT A.TitleType
FROM organizationlots A, TitleCategory B
WHERE A.TitleType<>B.TitleType

This code selects all from Table A regardless of what is in Table B. Can someone help me?

Thanks,
Terry
 
SELECT DISTINCT A.TitleType
FROM organizationlots A
LEFT JOIN TitleCategory B
ON A.TitleType = B.TitleType
WHERE B.TitleType Is Null
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top