You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear TaoK
To start with - My compliments to your SQL formatter; it's almost perfectly fitting my own taste in formatting SQL, and I'm glad I have it now.
I wanted to point you to a bug that manifests itself in the mentioned INSERT ... SELECT statement that includes a hint of the format /+ / : The hint belongs just after the INSERT keyword, before INTO. After re-formatting, it lands between the INTO keyword and the table name, which causes the Vertica compiler to choke with a syntax error. Not a problem if you know it - you just add a macro to swap the two symbols - but I thought I'd let you know.
Compliments again for that formatter! - Marco the Sane
See this example of a Vertica hint:
Before:
insert /+label(formatlabel)/ into foo values (42,'Arthur');
After:
INSERT INTO /+label(formatlabel)/ foo
VALUES (
1
,'Arthur'
);
The text was updated successfully, but these errors were encountered:
It makes sense that this is happening, and it makes sense that it's not acceptable for Oracle contexts. Priority noted accordingly.
TaoK
changed the title
Hint misplaced in INSERT INTO <table> SELECT ... statement
Oracle INSERT /*+ SOMEHINT */ INTO hints broken/misplaced by formatter
Nov 5, 2017
Dear TaoK
To start with - My compliments to your SQL formatter; it's almost perfectly fitting my own taste in formatting SQL, and I'm glad I have it now.
I wanted to point you to a bug that manifests itself in the mentioned INSERT ... SELECT statement that includes a hint of the format /+ / : The hint belongs just after the INSERT keyword, before INTO. After re-formatting, it lands between the INTO keyword and the table name, which causes the Vertica compiler to choke with a syntax error. Not a problem if you know it - you just add a macro to swap the two symbols - but I thought I'd let you know.
Compliments again for that formatter! - Marco the Sane
See this example of a Vertica hint:
Before:
insert /+label(formatlabel)/ into foo values (42,'Arthur');
After:
INSERT INTO /+label(formatlabel)/ foo
VALUES (
1
,'Arthur'
);
The text was updated successfully, but these errors were encountered: