Please start any new threads on our new
site at http://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Our new SQL Server Forums are live!
Come on over! We've restricted the ability to create new threads on these forums.
Yak Posting Veteran
Flowing Fount of Yak Knowledge
cust_num,id -- or perhaps DISTINCT cust_num
FROM #Cust c
WHERE EXISTS (SELECT * FROM #ID i WHERE i.ID1=c.ID OR i.ID2=c.ID);