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

Promes with SQL IN Clause

Status
Not open for further replies.

c100cbk2

Programmer
Sep 20, 2010
11
GB
I have the following code which if i replace the varaible @outputString with its literal value works fine but using the parameters fails

is there something i am missing?


WHERE (@OutputString IS NULL OR CPD.Agent_ID IN (@OutputString))

@OutputString is a varchar and looks like

'0BABEB0BF2304516BF22A4F2A4C271EB','7034E9E201DD443199DBDCADB3CFAEC2','E2F376B621E14C1FB532CED74C7EDCE1','9056F8239C8F462AB7A39B12DB8EDAA1'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top