12344-23s2$4
I have a value that I receive from the feed
12344-23s2$4, 12344-23s2$5, 12344-23s2$6, 12344-23s2$7
all the above values are separated by comma.
For each comma separated value I need to take only the right part that is after - (hyphen)
I tried using the below statement
right(ID, len(ID) - CHARINDEX('-', ID))
If I have only one value I get the correct value.. i.e., 23s2$4. but if i have multiple comma separated value i will get all the values after first -.
I want to take each comma separated value and from that each value I want to take only the right part(after hyphen)