conjurer111
Programmer
Hi
I have this table activities in Oracle whose structure is as follows -
id number (PK)
activity varchar2
description carchar2
hours number
activity_date date
My requirement is that I need to select all rows between two activity_date 's and insert them again in the same table. How do I go about doing this. Since Oracle doesn't have any Autonumber feature, during inserting data, I was reading the last id available and incrementing it by one and then inserting the rows. I didn't want to use a sequence as it could lead to a gap in the id's generated due to some error probably. Or am I better off using a sequence in Oracle.
Hence how should i proceed. I am also in a multi-user environment, so how do I handle concurrency issues.
Thanks.
I have this table activities in Oracle whose structure is as follows -
id number (PK)
activity varchar2
description carchar2
hours number
activity_date date
My requirement is that I need to select all rows between two activity_date 's and insert them again in the same table. How do I go about doing this. Since Oracle doesn't have any Autonumber feature, during inserting data, I was reading the last id available and incrementing it by one and then inserting the rows. I didn't want to use a sequence as it could lead to a gap in the id's generated due to some error probably. Or am I better off using a sequence in Oracle.
Hence how should i proceed. I am also in a multi-user environment, so how do I handle concurrency issues.
Thanks.