Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Erland Sommarskog Newsgroups: comp.databases.ms-sqlserver Subject: Re: is there a way to put a table into a parameter Date: Wed, 21 Dec 2011 23:34:30 +0100 Organization: Erland Sommarskog Lines: 20 Message-ID: References: <7aa6e91d-24ac-4416-8d12-36cfcf89f8bb@i6g2000vbe.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Injection-Info: mx04.eternal-september.org; posting-host="nBFDv6s1VJQDuF1w6hpX2A"; logging-data="26813"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+2i5FHzCI5BUE8PApaUUbC" User-Agent: Xnews/2006.08.24 Mime-proxy/2.1.c.0 (Win32) Cancel-Lock: sha1:nyVNk1YXHCFbhrCMdm/VPKPOSGo= Xref: x330-a1.tempe.blueboxinc.net comp.databases.ms-sqlserver:879 Bob Barrows (reb01501@NOyahooSPAM.com) writes: > select * from pharm where fieldname in (select fieldname from > interested_ndccodes) OR SELECT * FROM pharm p WHERE EXISTS (SELECT * FROM interested_ndccodes ndc WHERE parm.ndc LIKE ndc.ndc_coding) -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Links for SQL Server Books Online: SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx