jbooker
(Josh Booker)
21
Thanks. Good idea! I’ve used PARSENAME() before as well. Had not thought of substituting separator. Thanks for sharing.
Also, you can use STRING_SPLIT to return separated values as rows like so:
SELECT value, ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) AS ordinal
FROM STRING_SPLIT('apple~banana~orange', '~');
value |
ordinal |
apple |
1 |
banana |
2 |
orange |
3 |
1 Like
jbooker
(Josh Booker)
22
InvcHead SalesRepList example:
klincecum
(Kevin Lincecum)
23
I think I was confusing it with this:
CSmith
(Clint Smith)
24
Parsename ONLY reliably works if you do not have any preexisting periods in your dataset(s).
1 Like