how to delete the existing data and reload it again

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
aschand
Participant
Posts: 57
Joined: Thu Jan 03, 2008 9:28 pm

how to delete the existing data and reload it again

Post by aschand »

with datastage i have loaded the data into SQL Server table.

i want to run datastage again and relaod it...
Now how do i delete the existing data which is present in the table and reload...

it does also have the data came from other source


i should be able to delete only my data that i have loaded

thank you
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Dont you have any kind of timestamp column that will identify "your data"? Is this an ongoing thing or you just want to test your jobs again?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Plan ahea
d

You must incorporate this functionality from the beginning, by having some way of identifying which run loaded every row in the target. This might be a unique run ID, a timestamp, or anything else you can imagine. Use its value in the WHERE clause of a DELETE statement, perhaps executed as an Open command.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
gateleys
Premium Member
Premium Member
Posts: 992
Joined: Mon Aug 08, 2005 5:08 pm
Location: USA

Re: how to delete the existing data and reload it again

Post by gateleys »

aschand wrote:i should be able to delete only my data that i have
Forget DataStage for the time being. How would you delete those rows from your SQL Server target?
gateleys
Post Reply