Forum Replies Created

Viewing post 1 (of 1 total)

  • RE: UDF to return a multi column table of values from an input string

    Here is my version:

    create procedure ListToMultiColumnTable (@List Varchar(max), @ColumnCount int)

    as

    Begin

    declare @tempList Varchar(max), @tempListInner Varchar(max), @listToInsert nvarchar(max)

    Declare @ColumnNumber int,@substringCount int

    set @templist=replace(@List,',',''',''')+''','''

    While @templist<>''''

    Begin

    Set @ColumnNumber = 1

    set @substringCount=0

    set @tempListInner=@tempList

    set @listToInsert=''

    while @ColumnNumber <= @ColumnCount

    begin

    declare...

Viewing post 1 (of 1 total)