piltdown wrote:
Is it possible to have a field in one table obtain its value from another
field in a different table. For example, a table containing parts ordered
may contain a supplier field whose data is stored in a Suppliers table.
Thanks
Usually, you would define a fupplier table, that contains the supplier
information. Next, you store the supplier ID to reference the data in
the supplier table. The data in the supplier table is NOT duplicated in
another table. If you require data from the supplier table, then you use
it from the supplier table and reference it based on the supplier id.
For example...
SUPPLIER Table
Field SID
Field SNAME
PART Table
Field PID
Field SUPPLIER
Query:
SELECT PART.PID, SUPPLIER.SNAME FROM PART, SUPPLIER WHERE SUPPLIER.SID =
PART.SUPPLIER
I have not verified the syntax on this by the way.
--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info: http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]