Thursday, November 06, 2008

So I won't forget this the double split

coming back and editing this later. nothing that anyone couldn't figure out on their own, just something I bump into, here for ref

declare @p_value_rows as varchar(300)
set @p_value_rows = '234f~asd4adsfa~0dfsg'


SELECT
SUBSTRING(value_desc,0,CHARINDEX('~',value_desc))
, SUBSTRING(value_desc,CHARINDEX('~',value_desc)+1,LEN(value_desc) - CHARINDEX(value_desc,'~'))
FROM [db splitter function here](@p_value_rows, '')

No comments: