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

Update query gives 'Table not found' message SOLVED

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


Joined: 23 Oct 2008
Posts: 73
Location: Spain

PostPosted: Sat Nov 08, 2008 12:46 am    Post subject: Update query gives 'Table not found' message SOLVED Reply with quote

I am have trouble with a simple update query. I am using OO 3

It is run from Tools, SQL

The table is "Table1" and it has field "Myob"

The query is:-

update table "table1"
set "myob" = 1841

Running the query gives:-
1: Table not found in statement [update table]

Help please.

DonHugo


Last edited by DonHugo on Sat Nov 08, 2008 9:04 am; edited 1 time in total
Back to top
View user's profile Send private message
Voobase
OOo Advocate
OOo Advocate


Joined: 21 Nov 2007
Posts: 400
Location: Australia

PostPosted: Sat Nov 08, 2008 5:17 am    Post subject: Reply with quote

Hi there,

Wouldn't it be more like... UPDATE "Tabl1" SET "myob" = 1841

also, would you need a WHERE clause there too (unless you wanted every row in that table to have the myob field set to the number 1841).

Voo
Back to top
View user's profile Send private message
DonHugo
Power User
Power User


Joined: 23 Oct 2008
Posts: 73
Location: Spain

PostPosted: Sat Nov 08, 2008 7:25 am    Post subject: Reply with quote

Greetings Voo,

I have every variation of UPDATE TABLE "table1" that I can think of using the statement shown and also variations of UPDATE "table1" but still getting the same error message.

I did not include a WHERE clause because I wanted to keep things simple. I intended to update all of the records. As it is an experimental database there are only about 10 records.

Obviously I am struggling with OO. I had the same trouble when I moved from dBASE to MS Access.

Anyway, many thanks for your suggestions,

DonHugo
Back to top
View user's profile Send private message
Voobase
OOo Advocate
OOo Advocate


Joined: 21 Nov 2007
Posts: 400
Location: Australia

PostPosted: Sat Nov 08, 2008 7:41 am    Post subject: Reply with quote

No worries,

I haven't moved to OO V3.0 yet. I guess, check that your database is registered in Tools>Options>OO.Org Base. Also, the case for the text for the table and column names probably needs to be correct. Otherwise, not sure. If you do a search for some of the posts by Sliderule, he has some good stuff on SQL.

Cheers

Voo
Back to top
View user's profile Send private message
DonHugo
Power User
Power User


Joined: 23 Oct 2008
Posts: 73
Location: Spain

PostPosted: Sat Nov 08, 2008 8:00 am    Post subject: Reply with quote

Greetings Voo,

I am curious as to why I should register my database. What is the purpose of registering, given that it is the database of someone who is just trying to learn about Base.

Your comment about case sensitivity was a surprise as I read somewhere on this forum the there was no case sensitivity. I have not considered that as apossibility.

Regards,

Hugo
Back to top
View user's profile Send private message
Voobase
OOo Advocate
OOo Advocate


Joined: 21 Nov 2007
Posts: 400
Location: Australia

PostPosted: Sat Nov 08, 2008 8:23 am    Post subject: Reply with quote

Hi again Hugo,

Registering the database means that the Open Office Base application will know where the database is being kept on your computer for when macros are being used to refer to the database etc. It doesn't mean registering yourself as a user with Open Office in the traditional sense (like when you first install the software). I know.. it's a bit confusing.

I think case sensitivity is important for the SQL side of things and also when writing basic code and referencing form names etc. If you keep all your table and field names in capitals then you might not need to put quotes around them in some situations I think. Have a look towards the end of this recent post as some of this is explained.

http://www.oooforum.org/forum/viewtopic.phtml?t=76923

Cheers

Voo
Back to top
View user's profile Send private message
DonHugo
Power User
Power User


Joined: 23 Oct 2008
Posts: 73
Location: Spain

PostPosted: Sat Nov 08, 2008 9:04 am    Post subject: Reply with quote

Greetings Voo,

SUCCESS! It worked. As you suggested, the case was important.

UPDATE "Table1"
SET "Myob" = 1841

Now that the above update query works, I can build on it.

Regards,

Damn Happy DonHugo
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