[Solved] SELECT INTO query syntax error
Posted: Tue Oct 21, 2008 11:48 pm
(Well, at least it's resolved.)
Attempting to convert an existing Microsoft Access database to OpenOffice Base and also learn some SQL in the process, I have encountered a problem that I cannot solve with my very limited understanding, nor do I find the problem addressed under topics I can think of in this Forum. Condensed to its simplest form, here it is.
I have a table, Persons:
ID Person
1 Bill
2 Sue
3 Joe
4 Mary
In Access, the following query, qry_Backup_Persons,
creates a copy of Persons, which it is supposed to.
But in Base, with the same table, the same query,
has a syntax error: "Syntax error in SQL expression". No more detailed information is given. I have tried it with and without quotes and brackets around the table names and with and without the ';', all with the same result. What I am trying to do may be bad form, but I'm looking for a quick-and-dirty solution and the SELECT INTO approach would seem to provide it, if I could just get past the syntax error.
The problem occurs in both Ubuntu 8.04 and Windows XP versions of Base, using the HSQL database engine.
Is there a solution or a work-around or an alternate method to create a table from a query?
Attempting to convert an existing Microsoft Access database to OpenOffice Base and also learn some SQL in the process, I have encountered a problem that I cannot solve with my very limited understanding, nor do I find the problem addressed under topics I can think of in this Forum. Condensed to its simplest form, here it is.
I have a table, Persons:
ID Person
1 Bill
2 Sue
3 Joe
4 Mary
In Access, the following query, qry_Backup_Persons,
Code: Select all
SELECT *
INTO Persons_Backup
FROM Persons;
But in Base, with the same table, the same query,
Code: Select all
SELECT *
INTO Persons_Backup
FROM Persons;
The problem occurs in both Ubuntu 8.04 and Windows XP versions of Base, using the HSQL database engine.
Is there a solution or a work-around or an alternate method to create a table from a query?