Berhan Karagoez
asked on
#TempTable from comma separated textdata
I want to declare a list:
DECLARE @myList nvarchar(max) = '1,2,3~4,5,6';
Do cross appply (or similar) to get:
col 1, col 2, col 3
1 2 3
4 5 6
How would you do that?
/BK
DECLARE @myList nvarchar(max) = '1,2,3~4,5,6';
Do cross appply (or similar) to get:
col 1, col 2, col 3
1 2 3
4 5 6
How would you do that?
/BK
ASKER
No, I do not want to use BULK insert of any kind, sorry I forgot to mention this.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes Ryan - that is the solution.
I've also used xml to solve this but your solution was better and shorter code as well, plus it did exactly what I wanted!
Thank you.
I've also used xml to solve this but your solution was better and shorter code as well, plus it did exactly what I wanted!
Thank you.
Coool great
Open in new window