SQL string to INSERT into an associative table?

From: nospam <nospam_at_nospam.net>
Date: Wed, 30 Apr 2003 05:52:56 GMT
Message-ID: <3EAF6527.E1CF506E_at_nospam.net>



I have a question about a situation similar to one posted earler in another group, and repeated below for reference. I am trying to generate SQL script to insert data into an associative table, where the only fields in the table are the foreign keys. I can deal with the issue of requiring the entries to exist in the non-associative tables first, and I have even managed to fat-finger the associative table data in by hand into the back end of a MS-Access database, but for various reasons above my pay grade, I need a SQL string to to this in an automated manner, and I can't find a decent reference that tells how this is done. Many thanks in advance for anyone's advice.
>
> I am trying to write SQL statements for the following tables.
>
> Person (Person_ID, Name, Age, Interests)
> House (House_ID, Name/Number, Address, City)
> Lives (Person_ID,House_ID)
>
> In the 'Lives' table, I have defined Person_ID and House_ID as a
composite
> primary key, is this correct?
Received on Wed Apr 30 2003 - 07:52:56 CEST

Original text of this message