lee88
asked on
ADO table: how to INSERT dupliate of a record with autonumber primary key?
I need to understand how to do this with an ADO table named tblLineItems :
After SELECTing a single record (its autonumber field named ID is equal to x),
How do I INSERT a single dupliate of that record into the same table, but let the table's autonumber field (which is its primary key) generate a new autonumber value for the new record?
After SELECTing a single record (its autonumber field named ID is equal to x),
How do I INSERT a single dupliate of that record into the same table, but let the table's autonumber field (which is its primary key) generate a new autonumber value for the new record?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
perfect. Thanks!
Insert into Table1 (field1, field2)
SELECT field1, field2 FROM Table1
Do not include autonumber column. it will be populated automatically.