[Solved] Error while creating a table with SQL commands

Creating tables and queries
Post Reply
User avatar
Kartik Pachlodkar
Posts: 5
Joined: Thu Oct 27, 2022 2:48 pm

[Solved] Error while creating a table with SQL commands

Post by Kartik Pachlodkar »

To,
all members

It is to inform you all that while executing the SQL command for creating a table, an error is being shown that "The query can not be executed. It is too complex." but the syntax of every statement is correct and then also it is displaying an error.

Please help me if you can as i have tried a lot of times but have not gotten it. it has made me like this - :crazy: .

Please help me "ASAP"

Thanks

Kartik Pachlodkar

Enclosed: image displaying the error named as "1"

 Edit: Please do not write in all capitals. This is considered "shouting" at us.  
Make your post understandable by others 
-- MrProgrammer, forum moderator 
Attachments
Image displaying the error
Image displaying the error
1.jpg (46.92 KiB) Viewed 5158 times
Last edited by Kartik Pachlodkar on Sat Jan 21, 2023 6:59 am, edited 4 times in total.
OpenOffice Version - 4.1.13
Operating System - Windows 11
User avatar
charlie.it
Volunteer
Posts: 417
Joined: Wed Aug 21, 2013 2:12 pm
Location: Italy

Re: ERROR WHILE CREATING A TABLE WITH SQL COMMANDS

Post by charlie.it »

HI, I try your SQL command, it works for me, without errors.
charlie
Italian AOO Admin
macOS 14 Sonoma M1: Open Office 4.1.15 - LibreOffice 7.5.7.1

http://www.charlieopenoffice.altervista.org
FJCC
Moderator
Posts: 9284
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Error while creating a table with SQL commands

Post by FJCC »

I executed the following query successfully.

Code: Select all

CREATE TABLE "STUDENTS' GRADES" 
(
"NAME" VARCHAR(30),
"MARKS" NUMERIC(2)
);
I used the standard HSQLDB embedded database. Are you using an embedded database or something else?
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
User avatar
Kartik Pachlodkar
Posts: 5
Joined: Thu Oct 27, 2022 2:48 pm

[Solved] Error while creating a table with SQL commands

Post by Kartik Pachlodkar »

Hi,

Thanks for replying first of all!

But I don't have any standard HSQLDB-embedded database to use. Can you please tell me how can I use it???

Thanks
Last edited by Kartik Pachlodkar on Sat Jan 21, 2023 7:00 am, edited 1 time in total.
OpenOffice Version - 4.1.13
Operating System - Windows 11
FJCC
Moderator
Posts: 9284
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Error while creating a table with SQL commands

Post by FJCC »

If you are using the standard embedded data base engine, you will see text at the bottom of the Base window that is like the attached image.
Please explain the exact steps you took to make this Base document. You probably started with the menu File -> New -> Database. What steps did you take after that?
Embedded_DB.JPG
Embedded_DB.JPG (21.43 KiB) Viewed 5076 times
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
UnklDonald418
Volunteer
Posts: 1549
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Error while creating a table with SQL commands

Post by UnklDonald418 »

Also be aware that the table you are attempting to create won't be very useful. Without a Primary Key you won't be able to type any data into that table. That could be remedied by

Code: Select all

CREATE TABLE "STUDENTS' GRADES" 
(
"ID" Integer GENERATED BY DEFAULT AS IDENTITY NOT NULL PRIMARY KEY,
"NAME" VARCHAR(30),
"MARKS" NUMERIC(2)
);
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Post Reply