Home Forums SQL Server 2008 SQL Server Newbies substring/charindex RE: substring/charindex
SGT_squeequal
SSCertifiable
Points: 7167
More actions
November 8, 2012 at 3:01 am
#1557066
this gives you the charindex of comma 1 and comma 2
select charindex (',',col) as comma1,charindex(',',SUBSTRING(col,charindex(',',col)+1,99))+charindex (',',col) as comma2
from #t1
***The first step is always the hardest *******