Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 removing a table of data from another

Author  Topic 

Equator
Starting Member

2 Posts

Posted - 2002-06-13 : 06:04:41
I have 2 simple tables (1 field - 'eid' in each). 1 table is a list of opened ids (opened_ids), the second is a list of clicked through ids (clicked_ids). I wish to produce a table which consists of all values in the opened ids minus all values in the clicked ids.

I dont have a clue how to do it. Any help is greatly appreciated.

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2002-06-13 : 06:31:06
SELECT opened_ids FROM 1stTable WHERE opened_ids NOT IN (SELECT clicked_ids FROM 2ndTable)

Peace

Rick



Edited by - RickD on 06/13/2002 06:31:25
Go to Top of Page
   

- Advertisement -