Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I need to maintain a daily report database, which contains 2 identical structure tables, one table to save historical data, another table to save previous day data.
I want to realize function as following:
1.Check whether the historical data include data for the previous day.
2.If the previous day's data are missing, then added to the historical data table.
Thank you in advance!
Bing,
You should first identify the Primary Key in the table. Use exists function to identify whether the previous day data is in historical or not. Hope it is clear.
Best Regards,
Naresh
I think u can use here,Incremental load concept.
A correction
You should first identify the Primary Key in the table. Use exists function on the primary key field to identify whether the previous day data is in historical or not. Hope it is clear.
Best Regards,
Naresh
use exists function if perfect key is found else use date field.