Sqlserver
 sql >> Database >  >> RDS >> Sqlserver

Come dividere le stringhe in SQL Server

SELECT substring(data, 1, CHARINDEX(',',data)-1) col1,
substring(data, CHARINDEX(',',data)+1, LEN(data)) col2
FROM table