I am currently trying to insert a modified version of a table into another table. However, it is returning a “Exception: Syntax error at: SELECT” error.
However, the syntax is definitely okay and the error seems to have something to do with doing a linebreak in between the SELECT and the FROM statement.
Below you will find a reproducible example:
CREATE TABLE table_to_copy_to (a INT, b FLOAT, c TEXT, d TIMESTAMP); CREATE TABLE table_to_copy_from (a INT, b FLOAT, c TEXT, d TIMESTAMP); INSERT INTO table_to_copy_from VALUES (NULL, 3.1415, 'xyz', '2015-05-11 211720'); ## Works INSERT INTO table_to_copy_to SELECT * FROM table_to_copy_from #does not work INSERT INTO table_to_copy_to SELECT * FROM table_to_copy_from
As you are always so helpful @candido.dessanti , I would appreciate any suggestions with this one.
Thank you so much