Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Target pre and post sql

Status
Not open for further replies.

dbatlanta

Programmer
Feb 1, 2006
10
US

I need to delete three days(sysdate-2, sysdate-3, sysdate -4) data from my target table. Then I need to update three days (sysdate-3,sysdate-2,sysdate-1)data from the source table.

How do I accomplish this?

Is there a way to use the pre sql in Target properties to delete rows for three dates for the target. and use a sql override in the source qualifier to select rows for three dates and insert it into the target table.
 
Any valid SQL that you fire at the target will be excecuted first. You need to find the proper syntax to delete the recordset you want to delete.

However, you could investigate the possibility to split the process of deletes/updates based on the fact that you can use the sysdate in expression/filter WITHIN the mapping.

If that does not work out , then you could build a multi-pass , first having a run that performs the deletes and then a second one that performs the updates

Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top