Click here to Skip to main content
14,735,400 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
my data is Rama Brothers, New Delhi in a column
I want the output Rama Brothers in a column and New Delhi in another column

What I have tried:

string_split('Rama Brothers, New Delhi',',')
Posted
Updated 23-Feb-18 0:09am

1 solution

Nasty:
SELECT LEFT(CsvData, CHARINDEX(',', CsvData)), RIGHT(CsvData, LEN(CsvData) - CHARINDEX(',', CsvData)) FROM MyTable
Will do it, but you are much better off not storing your data like that at all.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900