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
 SQL Server Development (2000)
 help with (IN)

Author  Topic 

Saeed
Starting Member

39 Posts

Posted - 2002-12-18 : 21:49:25
insert into @mytable (MCC,ID) Select MCC,ID from #temp1
where MCC in (Select MCC from #temp2)

How would i be able to say , check for ID as well as MCC in temp2 table (same record) in my where clause ?

Thanks


skillile
Posting Yak Master

208 Posts

Posted - 2002-12-18 : 21:57:29
Inner join the two tables on MCCC.

INSERT ...
SELECT a.mcc, a.id
FROM #1 a
INNER JOIN #2 b ON a.mcc = b.mcc


slow down to move faster...
Go to Top of Page
   

- Advertisement -