Sql逗号分隔一个字符串
--取第一部分
select SubString('1234,6',0,charindex(',','1234,6',0))
--取第二部分
select SubString('1234,67',charindex(',','1234,67',0) + 1,len('1234,67') - charindex(',','1234,67',0))
--例如
declare @str nvarchar(100)
set @str = '123456,7890'
select SubString(@str,0,charindex(',',@str,0))
select SubString(@str,charindex(',',@str,0) + 1,len(@str) - charindex(',',@str,0))