0

I am trying to parse one varchar into three different columns. The values in question are separated by ##. Each variable also has a tag. So example of a string would be

12345##AA_09876##BB_123456##CC_34567

I want something like the following returned:

-------------------------------------------
** Front_tag | AA     | BB     | CC      **
**  12345    | 09876  | 123456 | 34567   **
-------------------------------------------

Unfortunately, it has to be in PL/SQL.

Thanks for your help!

  • Hint: Look up `SUBSTR` and `INSTR`. It is going to be a combination of that. Or you can always do regex. – ruudvan May 03 '16 at 20:16
  • Are you saying your table has columns Front_tag, AA, BB and CC, and which value goes into which column is determined by AA_ or BB_ etc. in the input string? If not, what did you mean by your example? –  May 03 '16 at 20:21
  • The example is an end table. the top row are columns, and the second row is the result I am looking for. AA, BB, and CC are given and constant. – GoneTaPlaid May 03 '16 at 20:26

0 Answers0