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!

a query problem

Status
Not open for further replies.

vcavusoglu

Programmer
Apr 26, 2001
41
0
0
TR
I have got two tables

Actually my query is
Query = Table1 - Table2

But I don' t now how to write this query
Please help me

For example:

First Table Table1

Name SurName Telephone
-----------------------------------
Ali Osman 2222222
Mustafa Murat 2131654
Reyhan Çelik 5646546
Cabbar Üstün 6546546

Second Table Table 2

Name SurName Telephone
-----------------------------------
Ali Osman 2222222
Cabbar Üstün 6546546

Query Result


Name SurName Telephone
-----------------------------------
Mustafa Murat 2131654
Reyhan Çelik 5646546


Thanks
 
SELECT Forename, Surname, Telephone
FROM Table1 LEFT JOIN Table2 ON Table1.ID = Table2.ID
WHERE (Table2.ID Is Null)

I am using ID, but maybe try ,

WHERE ((Table2.Forename Is NULL) AND (table2.surname IS NULL) AND (table2.telephone Is NULL))
 
bilgisayar,

You asked a similar question in thread183-203001. The answers you received there still apply to this question. Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top