Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am looking for a little guidance on the an incremental update problem. I am using Rob's template from his cookbook. My issue is that I have to join multiple tables and check if any of the tables have been updated. I have a record on every table named last_updated. If anything in the record changes this date changes.
I have an order and an order track table. I need to update the record if either of the last updated date changes on either of these tables. This seems pretty straight foward maybe this have been solved before.
Would one option be to concat both dates and the order code to use as a key? Any suggestion will help
I would gladly post my script and application but I am unsure how to attach a file?
Assuming you want only one row per order, the key should be the single field ORDER_CDE. You can also do away with the PK hashing and just refer to ORDER_CDE in the exists().
As for selecting a row if either table is updated, how about this for your incremental expression:
(o.LAST_UPDATED>='01/Jan/09' OR ot.LAST_UPDATED>='01/Jan/09)
-Rob
Here is the application with the load script
Assuming you want only one row per order, the key should be the single field ORDER_CDE. You can also do away with the PK hashing and just refer to ORDER_CDE in the exists().
As for selecting a row if either table is updated, how about this for your incremental expression:
(o.LAST_UPDATED>='01/Jan/09' OR ot.LAST_UPDATED>='01/Jan/09)
-Rob
Thanks Rob this makes more sense, I will try to work something up with this and post back.