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

List values from a table that are not present in another table

Status
Not open for further replies.

kolorasta

Technical User
Jul 2, 2002
65
AR
-table1
-field1, field2-
a, letra_a
b, letra_b
c, letra_c
d, letra_d

table2
-field1
b
c

OUTPUT wanted
letra_a
letra_d

I want to output all rows in table1 with the values not present in table2.

sorry for my poor english
 
Try:

[tt]select table1.field2
from table1 left join table2 on
table1.field1 = table2.field1
where table2.field1 is null[/tt]

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top