question

Julien avatar image
Julien asked

is there a script that would be able to duplicate and amend rows in a table?

Hi everyone,

So actually I am not a software developer but just looking for a tool that would help me in my daily job. I am currently using Toad For Oracle V10.6.1.3. The case I would like to introduce is as follows :

There is a table named "RATE" for example, with columns as follows :

AMNT(char), STDA(date), ENDA(date), STDT(date), ENDT(date).

Example 1 - simple duplicate : The line before modification looks like this

HEADER AMNT STDA ENDA STDT ENDT

ROW 1 10 23-DEC-19 31-DEC-99 23-DEC-19 31-DEC-99

When i do the required modification manually it ends up as

HEADER AMNT STDA ENDA STDT ENDT

ROW 1 10 23-DEC-19 31-DEC-19 23-DEC-19 31-DEC-20

ROW 2 10 01-JAN-20 31-DEC-99 01-JAN-20 31-DEC-99

Example 2 - duplicate with overlap : The line before modification looks like this

HEADER AMNT STDA ENDA STDT ENDT

ROW 1 10 23-DEC-19 31-DEC-99 23-DEC-19 31-DEC-99

When i do the required modification manually it ends up as

HEADER AMNT STDA ENDA STDT ENDT

ROW 1 10 23-DEC-19 31-DEC-19 23-DEC-19 31-DEC-20

ROW 2 10 01-JAN-20 29-FEB-19 01-JAN-20 29-FEB-19

ROW 3 10 01-JAN-20 31-DEC-99 01-MAR-20 31-DEC-99

Can you please advise if there is any script that would allow me to create the results in these two examples?

Thanking you all for your time and consideration on this matter. J.C

scriptduplicate
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.