inncoggnitto
Programmer
i want to insert a record into a table that has a primary key that is autogenerated. i have used TOAD to generate the insert statement for the record and it includes the key but i want to create a completely new record to replace one that was lost during data migration.
i get this from toad for an existing record.
INSERT INTO RC_PAY_ITEM_DETAIL ( RCPAYDPK, RCPAYIPK, RCAMNDPK, RCTASKPK, PRPAYDPK, SEQ, QTY, AMT,
UNIT_PRICE, ADD_DESCRIPTION, MOD_DT, MOD_USR, TSTDATE ) VALUES (
342700, 212155, 17975, NULL, NULL, 0, 1, 1000, 1000, NULL, TO_TIMESTAMP('3/23/2006 6:43:57.334000 PM','fmMMfm/fmDDfm/YYYY fmHH12fm:MI:SS.FF AM')
, 'fpconvert', TO_TIMESTAMP('3/23/2006 6:43:57.334000 PM','fmMMfm/fmDDfm/YYYY fmHH12fm:MI:SS.FF AM'));
COMMIT;
the first field is the index (primary key) field the other PKs are really foreign keys. if i want to insert a record and have the system generate the key what should i do?
i get this from toad for an existing record.
INSERT INTO RC_PAY_ITEM_DETAIL ( RCPAYDPK, RCPAYIPK, RCAMNDPK, RCTASKPK, PRPAYDPK, SEQ, QTY, AMT,
UNIT_PRICE, ADD_DESCRIPTION, MOD_DT, MOD_USR, TSTDATE ) VALUES (
342700, 212155, 17975, NULL, NULL, 0, 1, 1000, 1000, NULL, TO_TIMESTAMP('3/23/2006 6:43:57.334000 PM','fmMMfm/fmDDfm/YYYY fmHH12fm:MI:SS.FF AM')
, 'fpconvert', TO_TIMESTAMP('3/23/2006 6:43:57.334000 PM','fmMMfm/fmDDfm/YYYY fmHH12fm:MI:SS.FF AM'));
COMMIT;
the first field is the index (primary key) field the other PKs are really foreign keys. if i want to insert a record and have the system generate the key what should i do?