Forum Stats

  • 3,825,053 Users
  • 2,260,461 Discussions
  • 7,896,399 Comments

Discussions

pl/sql looping by adding a millisecond

User_F78YS
User_F78YS Member Posts: 10 Green Ribbon
edited Oct 7, 2020 12:24PM in SQL & PL/SQL

TableA: 100000 rows

ColA TIMESTAMP(6)

colB CHAR

colC CHAR


TableB: 0 rows

ColA TIMESTAMP(6)

colB CHAR

colC CHAR



  • Add a millisecond to a row in tableA where colB='ant' AND colC='dog'.
  • Check if the above timestamp value is present in tableA.
  • If no, insert the whole row into tableB.
  • If yes, add an other millisecond and check in tableA. (loop till value not found and then insert into TableB).


Answers