Re: [SQL] insert related data into two tables

2006-05-22 Thread Patrick JACQUOT
[EMAIL PROTECTED] wrote: Hello, I have two tables like these: TABLE_1: people registry fields: ID_T1, SURNAME, NAME ID_T1 is primary key TABLE_2: work groups fields: ID_T2, TASK ID_T2 is foreign key related to ID_T1 the first table is the list of employees, the second the task. Sometime I

Re: [SQL] insert related data into two tables

2006-05-20 Thread Ash Grove
You need to manage the transaction: begin a transaction, execute your first insert, retrieve the ID with curr_val(), execute the sencond insert and commit the transaction. --- [EMAIL PROTECTED] wrote: > Hello, > > I have two tables like these: > > TABLE_1: people registry > fields: ID_T1, SURN