[Solved] Table not found in statement

Creating tables and queries
Post Reply
Skrag
Posts: 13
Joined: Wed Mar 01, 2017 3:17 pm
Location: Konstanz, Germany

[Solved] Table not found in statement

Post by Skrag »

Dear all,

This seems like an easy problem, so I hope it hasn't been answered yet. At least I didn't find an answer.

I want to update my table und fill a newly created column with the default value. I use the following SQL code:

UPDATE TABLE "tblExample" SET "Embedded" = 0

It gives me this error message: "1: Table not found in statement [update table]"

Both table and column exist. I tried giving it "0" instead of 0 as a value, it doesn't help. I also tried reopening the database. The database is embedded, HSQL engine. The column is a foreign key, but I made sure that the desired value respects the integrity. Entering the value manually works. The command type ALTER TABLE works.

What am I doing wrong?
Last edited by Skrag on Tue Jul 25, 2017 1:53 pm, edited 1 time in total.
using OpenOffice 4.1.3 on macOS Sierra (10.12.3)
UnklDonald418
Volunteer
Posts: 1544
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Table not found in statement

Post by UnklDonald418 »

The keyword TABLE in your statement isn't needed. Try

Code: Select all

UPDATE "tblExample" SET "Embedded" = 0;
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
Skrag
Posts: 13
Joined: Wed Mar 01, 2017 3:17 pm
Location: Konstanz, Germany

Re: Table not found in statement

Post by Skrag »

Alright, now I feel stupid. I shouldn't ask stuff like this after a long day. I probably thought about the "ALTER"-commands and tried to do it in a parallel way. Thanks though!
using OpenOffice 4.1.3 on macOS Sierra (10.12.3)
Shlok
Posts: 1
Joined: Mon Dec 12, 2022 12:23 pm

Re: Table not found in statement

Post by Shlok »

UnklDonald418 wrote: Mon Jul 24, 2017 8:01 pm The keyword TABLE in your statement isn't needed. Try

Code: Select all

UPDATE "tblExample" SET "Embedded" = 0;
Sir,
can you help me for the same please.
Even I am trying to update my table but it is showing the problem table not found.
I typed -
update Students set Marks=850 where Roll_No=103;

Here table = Students
Field names are Marks and Roll_No
How to solve this problem?
OpenOffice 4.1.13 on Windows 10
User avatar
charlie.it
Volunteer
Posts: 417
Joined: Wed Aug 21, 2013 2:12 pm
Location: Italy

Re: Table not found in statement

Post by charlie.it »

Did you use double quotes?

Code: Select all

UPDATE "Students" SET "Marks"=850 WHERE "Roll_No"=103;
charlie
Italian AOO Admin
macOS 14 Sonoma M1: Open Office 4.1.15 - LibreOffice 7.5.7.1

http://www.charlieopenoffice.altervista.org
User avatar
Sliderule
Volunteer
Posts: 1278
Joined: Thu Nov 29, 2007 9:46 am

Re: Table not found in statement

Post by Sliderule »

Shlok wrote:update Students set Marks=850 where Roll_No=103;
The above should be

Code: Select all

update "Students" set "Marks"=850 where "Roll_No"=103;
Explanation:
  1. Since you are using Mixed Case, NOT ALL UPPER CASE letters for both Tables and Column Names, they must be surrounded by double quotes ( " ) .
  2. Just as an addition FYI ( For Your Information ), since an UPDATE statement is NOT a Query, it must be run from the menu: Tools -> SQL...
I hope this helps, please be sure to let me / us know.

Sliderule
Post Reply