Hi everyone. i'm working on 18c database.
I have a table named TAB_TF, where data are inserted day wise in following way. (e.g. 1-Jan data inserted in TAB_TF ) :-
TAB_TF
FILE_DATE | TF_ID | COMPANY | TF_VALUE |
1-Jan | TF0001 | BD0010110 | 2025 |
1-Jan | TF0002 | BD0010132 | 11200000 |
1-Jan | TF0003 | BD0010114 | 18369.74 |
1-Jan | TF0004 | BD0010118 | 16500 |
1-Jan | TF0005 | BD0010110 | 4750 |
In day 2 (i.e. 2-Jan), TAF_TF table is inserted with following values:-
TAB_TF
FILE_DATE | TF_ID | COMPANY | TF_VALUE |
2-Jan | TF0001 | BD0010110 | 2025 |
2-Jan | TF0003 | BD0010114 | 18369.74 |
2-Jan | TF0004 | BD0010118 | 16500 |
2-Jan | TF0005 | BD0010110 | 4750 |
2-Jan | TF0006 | BD0010132 | 11200000 |
2-Jan | TF0007 | BD0010114 | 18369.74 |
Note : Here we can seen that , TF0002 is end it's life cycle and TF0006 & TF0007 are inserted and ready to start its life cycle.
Now, help me in writing an pl/sql procedure, such that i can make a register data (in another table called REGISTER_TAB_TF) based on all values in following structure. (i.e the table contains all TF_ID with status on and off)
REGISTER_TAB_TF
TF_ID | COMPANY | TF_VALUE |
TF0001 | BD0010110 | 2025 |
TF0002 | BD0010132 | 11200000 |
TF0003 | BD0010114 | 18369.74 |
TF0004 | BD0010118 | 16500 |
TF0005 | BD0010110 | 4750 |
TF0006 | BD0010132 | 11200000 |
TF0007 | BD0010114 | 18369.74 |
Thanks in advance.