I have a table named booking. The primary key is booking_id
. The table has a column named booking_num
. booking_num
is used to identify the booking.
Another table is booking_hist. The purpose is to transfer completed records of booking from booking table into booking_hist table after a certain period, let's say 2 days. The column to identify it will be completed_dt
.
For example, completed_dt
is '08-SEP-19'.
What I'm trying to achieve is that after immediately 2 days after this date, it will be moved into booking_hist
table.
Should there be any null<->non-null conversions of the column? What is the logic I need to achieve this? How can i get the date to count 2 days?