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

Big Problem

Status
Not open for further replies.

Sadus

Programmer
Apr 21, 2003
8
US
Hi,

I have 2 tables : table1(name, lastname) and
table2(name,lastname,iduser) and I have to create a SQL command which
must do this :

If in the table1 I have :

name lastname
durand michael
dupond john

and in table2 :
name lastname iduser
durand michael toto
dupond john toto
durand michael tutu

I must have a result like this dupond,john,tutu because tutu have not
all the data from table1.

Thanks
 
Try this query.

Select table2.* From table2 Left Join table1
On table2.name=table1.name
And table2.lastname=table1.lastname
Where table1.name is null Terry

The reason why worry kills more people than work is that more people worry than work. - Robert Frost
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top