I am trying to build a DECODE statement from a string to sort my data. I need to loop through the string and for each data in quotes give it an counter number that start with 1. Can someone please point me in the right direction on how to figure this out.
string: &TC_V1 = 'CA' 'ALC' 'BAL'
Below is what I would like the DECODE statement to look like:
SORT/I2 = DECODE DACODE('CA' 1 'ALC' 2 'BAL' 3)
This message has been edited. Last edited by: <Kathryn Henning>,