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

Sql server - stored procedure

Status
Not open for further replies.

KClark

Technical User
Oct 1, 2001
3
GB
How do I pass a comma separated list to a single parameter.

eg
Create procedure [PROCESSLIST] @unit_list varchar (255)
.
.
.



exec process list 'market,finance,IT'
 
It appears that your code for passing the string to the SP is correct. I suspect the question is really, "How do I parse a comma delimited string in a stored procedure?" There are three parameter parsing scripts available for download at SWYNK.COM. One should fill your need.


If I've incorrectly interpreted your question, please provide more detail. Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top