Groups | Blog | Home
all groups > sql server programming > november 2004 >

sql server programming : Need help creating SP


Danny Ni
11/12/2004 8:00:23 PM
Hi,

I like to create a store procedure that takes a comma delimited varchar as
parameter, and split them into an array and insert elements into a table.
For instance, if the parameter input is 1,2,3,4 , there will be 4 records
inserted into a table with respective value of 1,2, 3 and 4. How do I do it?

TIA

Steve Kass
11/12/2004 11:18:00 PM
Danny,

You should find some ideas here:

http://www.users.drew.edu/skass/sql/ListToTableFunction.sql.txt
http://www.sommarskog.se/arrays-in-sql.html
http://users.drew.edu/skass/sql/ListToTableProc.sql.txt

Steve Kass
Drew University

[quoted text, click to view]
AddThis Social Bookmark Button