Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Rita Bhatnagar
Posting Yak Master
172 Posts |
Posted - 2001-06-26 : 10:32:20
|
| HiI used one of your old codes to write this function. Do you think it is fine.I am using it for 200 stored procedure.CREATE FUNCTION Get_List( @array varchar(500) )RETURNS @temp TABLE(list_item int)ASBEGINdeclare @separator_position intdeclare @array_value varchar(500)select @separator_position= patindex('%,%',@array)Set @Array =Stuff(@array,1,@separator_position,'')While patindex('%,%',@array)<>0Beginselect @separator_position= patindex('%,%',@array)select @array_value = left(@array,@separator_position-1)insert into @temp select @array_valueselect @array=stuff(@array,1,@separator_position,'')endRETURNEND |
|
|
|
|
|