• Sorry... Disn't told you the usage in your scenario,

    here it is...

    Declare @v1 varchar(20)

    Declare @v2 varchar(1000)

    Set @v1 = '1,Joy~2,Jack~3,Rozy'

    Select Left([value],charindex(',',[value])-1) as ID,

    right([value],len([value]) - charindex(',',[value])) as val

    from dbo.fnSplit(@v1,'~')

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]