OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Unexpected token in SQL [SOLVED]

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
LinuxConvert2010
Newbie
Newbie


Joined: 23 Feb 2010
Posts: 1

PostPosted: Tue Mar 02, 2010 11:57 am    Post subject: Unexpected token in SQL [SOLVED] Reply with quote

I'm relatively new to OpenOffice and SQL. What exactly does an unexpected token mean in the context of creating a table from another table?

For example, I have written the following syntax (I've paraphrased with the table and column names) : CREATE TABLE TableName AS (SELECT Column1, Column2, Column 3 FROM TableName2);

When I run this or attempt to, I receive the following error message:

1: Unexpected token AS, requires ( in statement [CREATE TABLE TableName AS]

It does seem to be a syntax error, but I can't seem to resolve it. Any suggestions?


Last edited by LinuxConvert2010 on Mon Mar 08, 2010 7:06 am; edited 1 time in total
Back to top
View user's profile Send private message
RPG
Super User
Super User


Joined: 24 Apr 2008
Posts: 2697
Location: Apeldoorn, Netherland

PostPosted: Tue Mar 02, 2010 4:31 pm    Post subject: Reply with quote

Hello

Study the HSQLDB manual for the syntax of the HSQLDB engine. Look good for the version. For better understanding SQL study an SQL tutorial. I think you should use the bultin tools. When you realy want use the commandline then you must realy study.

Romke
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group