
SELECT id, Name, value Name FROM tblRegister CROSS APPLY STRING_SPLIT(Name, ',');
I Got this Error
Msg 208, Level 16, State 1, Line 1
Invalid object name 'STRING_SPLIT'.

SELECT id, Name, value Name FROM tblRegister CROSS APPLY STRING_SPLIT(Name, ',');
I Got this Error
Msg 208, Level 16, State 1, Line 1
Invalid object name 'STRING_SPLIT'.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rijwan AnsariPosted Mar 5, 2022, 5:59 PM
Guest UserPosted Mar 5, 2022, 5:54 PM
Rijwan AnsariPosted Mar 5, 2022, 5:52 PM
Sachin SinghPosted Mar 5, 2022, 12:27 PM
Guest UserPosted Mar 4, 2022, 6:35 PM
SELECT id, Name, '' as Nam1 ,'' as Nam2,'' as Nam3 from tblRegister
Select id,
Name,
ISNULL([Nam1],'') AS [Nam1],
ISNULL([Nam2],'') AS [Nam2],
ISNULL([Nam3],'') AS [Nam3]
From (
Select id,
Name,
'Nam'+CAST(ROW_NUMBER()OVER(PARTITION BY id order by id) as int) as Col,
Split.value
From tblRegister AS REG
Cross apply string_split(Name,',') AS Split)
AS Tbl
pivot (MAX(value) For Col IN ([Nam1],[Nam2],[Nam3])
) AS Pvt
(1 row affected)
Msg 208, Level 16, State 1, Line 5
Invalid object name 'string_split'.
Completion time: 2022-03-04T23:34:31.3593222+05:00
Guest UserPosted Mar 4, 2022, 2:24 PM
Rijwan AnsariPosted Mar 4, 2022, 11:56 AM
Guest UserPosted Mar 4, 2022, 11:11 AM
Rijwan Ansari Yes Like this how can i do
Rijwan AnsariPosted Mar 4, 2022, 5:32 AM
Nitin SontakkePosted Mar 4, 2022, 5:05 AM
Muhammad Imran AnsariPosted Mar 3, 2022, 11:56 PM