I have a table A (columns: id, year,month,amount) and table B( columns: id, year,month, amount=0).
Table A is the master table which have a same set of ids for each month for every year from 2011 to 2016.
In that some records are not present (like their is no record for 123456 id for 03 month and 2016 year and 468976 amountk), for that I want to add new record having id 123456, 03 in month and 2016 in year in table A and as it is a missing record amount will be 0.
The missing records are taken from table B which is having same set of ids from table A and for each id it is having every month for every year from 2011 to 2016, for each row amounts as 0.
Note: 1. In table A record s are not sorted and in table records are grouped by id, year and month. 2. If possible please make it normal sql queries instead of pl/sql. If not possible as I wanted please suggest your answer.
Thanks in advance........I hope you understsnd the problem statement.