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

maybe an easy join

Status
Not open for further replies.

michelleqw

Programmer
Jan 4, 2004
120
DE
Dear sql user,

We do have to tables:

TblX tBLy
Fld_x fLD_Y
A A
B
C

We are trying to get a join with the next result:

Fld
B
C

Can someone give us a solution?

Nice regards,

Michelle.
 
SELECT Fld_x
FROM TblX LEFT JOIN tBLy ON Fld_x = fLD_Y
WHERE fLD_Y IS NULL

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Okay, which one is faster, the EXCEPT or the LEFT OUTER JOIN where field is NULL? Or does the optimizer just end up running a Leftie anyway?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top