Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
vpolasa
Starting Member
1 Post |
Posted - 2015-04-10 : 10:39:55
|
Hi, I have Oracle query which seperates a text with commas to column data. Can we achieve this in SQL Server? with t as (select 'abcd,123,defoifcd,87765,aoiwerwe' as str from dual) select level as n, regexp_substr(str,'[^,]+',1,level) as val from t connect by regexp_substr(str,'[^,]+',1,level) is not null;N VAL1 abcd2 1233 defoifcd4 877655 aoiwerweI'm working on SQL Server 2012, Windows 7. Thanks |
|
MichaelJSQL
Constraint Violating Yak Guru
252 Posts |
|
|
|
|
|
|