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

[SOLVED] Question about using queries in tables

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


Joined: 23 Feb 2012
Posts: 46

PostPosted: Mon Feb 27, 2012 9:41 am    Post subject: [SOLVED] Question about using queries in tables Reply with quote

I have a question that arose while I was working on converting an old MS Access database to Base. In particular, I have a database containing a plethora of information about my music library. My original music library is quite extensive and has a number of tables, not just relating to the music in my collection, but to other things as well.

One of the things I found a need to do was create a query (there are a lot of queries I want to write) to extract certain information from the main table (which is actually a catalog of all the sheet music I have), but then take the extracted information from the query and use it "back" in another table. It *seems* to me being a novice Base user that queries are kind of one-way streets: Once you create/generate them and their contents, you can't use them as tables (I bet I'm wrong about this, but I can't seem to go back and create a new table in Base and link to or otherwise use the query results...either use the Wizard and get stuck with Personal or Business templates, or use the table design view where you do the standard field naming and type selection). So, is it possible to use a query (result set) as a new table or as part of an existing table, and if so, how do you do it?

Thanks,
Mike


Last edited by Zerex71 on Thu Mar 01, 2012 6:56 am; edited 1 time in total
Back to top
View user's profile Send private message
mgroenescheij
Super User
Super User


Joined: 20 Apr 2011
Posts: 870
Location: Australia

PostPosted: Mon Feb 27, 2012 6:35 pm    Post subject: Reply with quote

Hi,

Quote:
Once you create/generate them and their contents, you can't use them as tables (I bet I'm wrong about this
Yes you are wrong. You can use a Query to Create a new Table, Update a Table or Alter a Table.
The only thing is you should use the SQL entry from the Tools menu.

Just a comment, I see that you have lost of data that you want to convert to Base, you should be aware of the risk when you use the embedded database, when it crash it's nearly impossible to restore the data, best thing is to install an external database.

Martin
_________________
If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button).
Back to top
View user's profile Send private message
Zerex71
General User
General User


Joined: 23 Feb 2012
Posts: 46

PostPosted: Mon Feb 27, 2012 6:39 pm    Post subject: Reply with quote

Thanks, Martin. I plan to try out the HSQL 2.2.8 update as per Sliderule and DACM's suggestions. I just don't have time to try it out and not screw something up. However, all I want to be able to do is:

1. Be able to edit the database either on my home machine (Mac running OS X Lion) or at work (PC running Win 7).
2. Have it still be as easy to work with as it currently is.

It seems like this is possible, and the only problems I've had have been on the Mac, but I just need a little time to wade my way through all the text and tutorials that DACM put together to find out what the right solution is for what I want to do.

Mike
Back to top
View user's profile Send private message
Zerex71
General User
General User


Joined: 23 Feb 2012
Posts: 46

PostPosted: Tue Feb 28, 2012 12:22 pm    Post subject: Reply with quote

Two things:

1. Per my other post, the migration/upgrade seemed to work. It was so transparent, I really can't tell any difference from before. Actually, I'm more interested to see if I can get the same migration working on OS X Lion because that's where I've had the actual crashes and data corruption.

2. When you say that I can use queries to do things to tables, do you mean via SQL, or is there a way to do it "graphically" through Base? I'm sure it's somehow doable in SQL, but I am looking for an easy way to do it in Base and don't see it. To me it seems unidirectional: populate a table or tables, then run a query on said table(s). The query results (result set) doesn't seem to be useable as another table, i.e. I can't generate another table, and then do things with that. At least I can't figure out how you would do it in Base.

Mike
Back to top
View user's profile Send private message
Zerex71
General User
General User


Joined: 23 Feb 2012
Posts: 46

PostPosted: Thu Mar 01, 2012 6:56 am    Post subject: Reply with quote

I am marking this as Solved since my last two questions have essentially been answered.

Mike
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