0

Here my question. I have a long string in a table, now I want to split it, and insert the result from splitting into another table.

for example.

INSERT TABLE table1 
SELECT 
    split(result, ';')[0],
    split(result, ';')[1],
    ...
FROM table2
WHERE ...

suppose result is a long string delimited by ';'

My query is not right, How can I fix it?

Carlos Lin
  • 149
  • 2
  • 3
  • 9

1 Answers1

0

The only problem I can see is the first line. Alter it like so..

INSERT INTO TABLE table1
... 
lhoworko
  • 1,191
  • 2
  • 13
  • 24