Hi,
Is there any way in which rows which no longer exist in the Source tables can be deleted from the target tables using logic inherent to Datastage?
We are running server jobs on the Datastage Enterprise 7.5.1.A edition.
Thanks,
Delete Rows from target table
Moderators: chulett, rschirm, roy
Sure you can, it is quite easy. One easy way (but not necessarily the fastest for huge data volumes): Do a lookup from the target to the source; if the lookup is not successful then output to a stage which deletes those rows from the target.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Premium Member
- Posts: 783
- Joined: Mon Jan 16, 2006 10:17 pm
- Location: Sydney, Australia
Change capture is in Enterprise.
Why not re-create the Target table instead of deleting. You can use bulk loader to load the target again.
Why not re-create the Target table instead of deleting. You can use bulk loader to load the target again.
Regards
Siva
Listening to the Learned
"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
Siva
Listening to the Learned
"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
To find the records which are not in Source, you need to do a look, it can be either through Lookup Stage or Join stage as Arnd saind or recreate a table thorough a query INSERT INTO ....(SELECT ... FROM <target> IN(SELECT ... FROM <source>)) as suggested by Siva.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'