two table query

Creating tables and queries
Post Reply
crivera1228
Posts: 2
Joined: Mon Dec 03, 2007 10:28 pm

two table query

Post by crivera1228 »

How do you make a query using two tables?
User avatar
kabing
Volunteer
Posts: 678
Joined: Fri Nov 23, 2007 12:05 am
Location: Midwest, USA

Re: two table query

Post 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
NeoOffice (app store version) OpenOffice.org 4.1 and LibreOffice 4.3 on Mac OS X El Capitan
OpenOffice.org 4.1.2 on Windows 10 (Previously on Vista)
Post Reply