I'm trying to add a new record (new values) into one table and I have a second table that refers to the record number of the first table. I can get the SQL statement to grab the current value of the incrementing record number to work, but I need to translate this to operate in perl (I'm not used to dealing with multiple SQL statements in perl - usually just a select or an insert) INSERT INTO notes (fields) VALUES (new stuff); $variable = SELECT CURRVAL('name-of-sequence-for-notes_id') INSERT INTO palm_memos (notes_id, other fields) VALUES ($variable, other fields); Could someone post how to do this please? Is there a better way to accomplish the objective? I'm a little nervous that in a multi-user system the database may slip in another INSERT statement from another user prior to this routine getting the current value of the incrementing record number and thereby throwing off the returned valueThread Previous | Thread Next