On Nov 28, 2015, at 12:41 PM, Mark Raasveldt <mark.raasveldt@gmail.com> wrote:MarkRegards,Hey Charles,When creating a table from a query, you have to specify whether you want to copy the data from the query (WITH DATA), or create an empty table, i.e. just copy the schema from the query (WITHOUT DATA). The error messages specifies that it did not expect a semicolon (i.e. "end of query"), but expected either WITH DATA or WITHOUT DATA._______________________________________________On Sat, Nov 28, 2015 at 6:38 PM, Charles DiMaggio <charles.dimaggio@gmail.com> wrote:Hello. I am trying to create a new table as the union of two existing tables via an R DBI connection, but am receiving an error message that I cannot seem to fix. Any advice to help correct the syntax would be greatly appreciated.> dbGetQuery(mdb,+ "CREATE TABLE nis_0411 AS+ Select * FROM nis_0407+ UNION ALL+ Select * FROM is_0811")Error in .local(conn, statement, ...) :Unable to execute statement 'CREATE TABLE nis_0411 ASSelect * FROM nis_0407UNION ALLSelect * FROM nis_0811'.Server says 'syntax error, unexpected SCOLON, expecting WITH in: "create table nis_0411 asselect * from nis_0407union allselect * from nis_"' [#42000].CheersCharlesCharles DiMaggio, PhD, MPHDirector of Injury ResearchDepartment of SurgeryNew York University School of Medicine462 First Avenue, NBV 15New York, NY 10016-9196Direct Line: 516.308.6426 (preferred)Office: 212.263.3202
_______________________________________________
users-list mailing list
users-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/users-list
users-list mailing list
users-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/users-list