SQL INSERT INTO multiple Tables- HELP!!!

From: SeanN <raevaen_at_dimensional.com>
Date: 1996/08/11
Message-ID: <01bb874c$a8b94900$708264ce_at_raevaen.dimensional.com>#1/1


I need to do a nested parameter query and really need some help Table 1 has P_ID, a counter field. When I INSERT INTO Table 1, I also need to INSERT the P_ID (unknown until after the insert when it will be incremented) into Table 2. Alone with all this, some PARAMETERS need to go into Table 1 and Table 2.

HELP!!!! It would be nice if something like:

Parameters newName, newYear;
INSERT INTO Table1 INNER JOIN Table2 ON Table1.P_ID=Table2.P_ID (Table1.Name, Table2.P_ID, Table2.Year)
VALUES (newName, Table1.P_ID, newYear);

could be done but this is totally incorrect. ACK! but it kinda shows what I need to do. HELP!!!

raevaen_at_dimensional.com Received on Sun Aug 11 1996 - 00:00:00 CEST

Original text of this message