Page 1 of 1

two table query

PostPosted: Mon Dec 03, 2007 10:36 pm
by crivera1228
How do you make a query using two tables?

Re: two table query

PostPosted: Mon Dec 03, 2007 11:46 pm
by kabing
The easiest way is to use the Query wizard, except that sometimes the query wizard won't finish if more than one table is chosen.

To do it in design view, you add the number of tables you need to the query (using the add tables window that appears when you create a new query in design view), make sure there are relationships between the tables (drag one related field to the other if there are not), and selecting the fields you need.

There is a more detailed tutorial available here. Note that the tutorial is written for NeoOffice, a Mac port/fork of OpenOffice.org. Since NeoOffice is based on OpenOffice.org, the instructions should work fine for OpenOffice.org, if you keep the following things in mind:

1) references to the command key in a Neo tutorial are the equivalent to the control key in OOo. (i.e. Command-C becomes Control-C) Note that I'm not sure if this is true with OOo for X11.
2) control-clicking is the same as right clicking
3) icons sometimes look different, as NeoOffice 2.2.2 has a custom icon set.

Finally: is you know SQL, you can also create the query in SQL view.

kabing