How can we help you today?
Multiple Row Insert
2 CommentsSorted by Oldest First
You seem to have a trailing UNION on the final SELECT, so it's expecting another SELECT to follow. That's probably what the error is complaining about.
Also, it might require parentheses around the sub-query of the INSERT (from before the first SELECT to after the final SELECT of the multi-UNION), but it may also accept it without them.
Crap. Thank you. I missed the trailing UNION.
Ben Gehring
I'm trying to write a query to insert multiple rows. I saw this thead (http://support.vistadb.com/support/discussions/topics/4000336627) which says the SQL server syntax isn't supported, but using unions work. I've tried this with 5.7 and 6 beta. Am I doing something wrong?
The error I get is:
Line #: 11; Column #: 1
Error 509 (Provider v. 5.7.4.0): Invalid or incomplete statement: SELECT
Line #: 10; Column #: 1
Error 509 (Provider v. 5.7.4.0): Invalid or incomplete statement: SELECT
Line #: 9; Column #: 1
Error 509 (Provider v. 5.7.4.0): Invalid or incomplete statement: SELECT
Line #: 8; Column #: 1
Error 509 (Provider v. 5.7.4.0): Invalid or incomplete statement: SELECT
Line #: 7; Column #: 1
Error 509 (Provider v. 5.7.4.0): Invalid or incomplete statement: SELECT
Line #: 6; Column #: 1
Error 509 (Provider v. 5.7.4.0): Invalid or incomplete statement: SELECT
Line #: 5; Column #: 1
Error 509 (Provider v. 5.7.4.0): Invalid or incomplete statement: SELECT
Line #: 4; Column #: 1
Error 509 (Provider v. 5.7.4.0): Invalid or incomplete statement: SELECT
Line #: 3; Column #: 1
Error 509 (Provider v. 5.7.4.0): Invalid or incomplete statement: SELECT
Line #: 2; Column #: 1
Error 509 (Provider v. 5.7.4.0): Invalid or incomplete statement: INSERT
Line #: 1; Column #: 1