BAQ ~List~ handling

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

InvcHead SalesRepList example:

I think I was confusing it with this:

Parsename ONLY reliably works if you do not have any preexisting periods in your dataset(s).

1 Like