0

i have a comma separated string as below

M1: TestString1, M2: TestString2, M3: TestString3, M4: TestString4, M5: TestString5, M6: TestString6, M7: TestString7

i need output as

code String
M1 TestString1
M2 TestString2
M3 TestString3
M4 TestString4
M5 TestString5
M6 TestString6
M7 TestString7

can any1 help me in getting the query

Pasha Md
  • 37
  • 5
  • @OldProgrammer - certainly not that thread; here the OP has multiple columns, not just multiple values to be split into a single column. –  Sep 24 '21 at 15:11
  • Your input string looks very much like an array of key-value pairs. JSON is a perfect "language" to express such data in string format. Is it possible to change the **input** so that it is a proper JSON string? (Meaning, wherever this string is coming from - can that process, which generates your input string, generate a JSON instead?) In any case, on the database end - as a poor substitute for what I suggested above - you can first process the input string to make it a valid JSON; then split it with JSON tools. This requires version 12.1; what is your Oracle version? –  Sep 24 '21 at 15:14

0 Answers0