How to check if a text exists within another in SQL Server 2008 / How to split SQL Column based on Comma
You can use the combination of CharIndex and Substring function in SQL to split the string based on delimiter.
Here is a way to split a column based on Comma
Select LTRIM(SUBSTRING(EmpAddress, CHARINDEX( ',',EmpAddress)+1,len(EmpAddress))) from #TempEmployee
We have used Ltrim to remove any leading spaces
Subscribe to:
Posts (Atom)