I have the following table called DQS_Raw
with two columns.
DQS_Raw
id Result
-----------------
1 |01|00|00|01
2 |00|01|01|00
3 |00|00|00|01
I need to use a stored procedure to get the below table result.
The below table has 6 columns.
DQS_Raw
id Result VF02a VF02b VF02c VF05b
------------------------------------------
1 |01|00|00|01 01 00 00 01
2 |00|01|01|00 00 01 01 00
3 |00|00|00|01 00 00 00 01
As noted here the values between the pipe delimited characters are extracted. The first extracted values are assigned to the column VF02a, the second assigned to VF02b and so on.
I also need this to be dynamic enough in case the order changes from the input.
Please don't use a set based approach.
Jono