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!

Splitting variables in stored procedures

Status
Not open for further replies.

MattDavies51

Programmer
Oct 13, 2002
24
GB
I am passing a parameter(varchar) into a stored procedure that contains several values, and I was wondering whether SQL Server allows you to split the parameter/variable into the separate values. eg. say "Red, Blue, Green, Yellow" is passed as one parameter, I would like to break this down into 4 variables.

I know about the substring/left/right/mid functions but I am looking for something similar to the split function in VB.

Please help.
 
As far as I know,there is no split function as you describe.
So you could only use round-about method.
The round about method can be choosed from string functions
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top