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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IN clause and variables 1

Status
Not open for further replies.

deepsheep

Programmer
Sep 13, 2002
154
CA
I'm trying to pass a formatted array to a Stored Procedure and am having problems with the SQL. I know I can use dynamic SQL, but was hoping to avoid using it.

Sample of what I'm trying, it works as dynamic, but not this way:
Code:
declare @Param  nvarchar(200),
@cmd nvarchar(2000)
set @Param='(00175072010,00175184020)'

select * from PropertyTable  where pmlinc IN @Param
Any ideas? maybe there's another way?

Thanks!
 
Check Split function here in FAQ. Tht function retuns table which you can join to your table.

Borislav Borissov
VFP9 SP2, SQL Server 2000,2005 & 2008.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top