Deleting records
Moderators: chulett, rschirm, roy
Deleting records
Hi All,
My source file is a flat file and the target is a OCI
Now i need to apply a logic like
If key fields matches and also
col1 =tar.col1 and
col2 =tar.col2 and
col3 =tar.col3 and
col4 =tar.col4
if the above condition satisfies then I should delete the records from the table
Please suggest ,how to implement the logic in Datastage
should i use the notisnull for all the columns and select the delete option from the update action from OCI
Should I need to write any stored procedure
Is there any other way to get this logic
Thnaks in advance
Saik.
My source file is a flat file and the target is a OCI
Now i need to apply a logic like
If key fields matches and also
col1 =tar.col1 and
col2 =tar.col2 and
col3 =tar.col3 and
col4 =tar.col4
if the above condition satisfies then I should delete the records from the table
Please suggest ,how to implement the logic in Datastage
should i use the notisnull for all the columns and select the delete option from the update action from OCI
Should I need to write any stored procedure
Is there any other way to get this logic
Thnaks in advance
Saik.
Hi,
Bare in mind feeding a DB stage rows for deletion is bound ot have poor performance!, simply since your issueing each row in a seperate delete.
You might boost performance by populating a temporary table with the relevant rowid values you want to delete and issue the delete with a subquery on the temp table.
In any case of performance issues I strongly recomend consulting your DBA for optimal performance.
IHTH,
Bare in mind feeding a DB stage rows for deletion is bound ot have poor performance!, simply since your issueing each row in a seperate delete.
You might boost performance by populating a temporary table with the relevant rowid values you want to delete and issue the delete with a subquery on the temp table.
In any case of performance issues I strongly recomend consulting your DBA for optimal performance.
IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
What was missing from Roy's post, in your opinion?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 232
- Joined: Fri Sep 30, 2005 4:52 am
- Contact:
I'm not sure what you mean by this suggestion - it won't affect the actual DELETE command at all.sb_akarmarkar wrote:Please make rest of column col1, col2,col3 and col4 as key column also in datastage column defination tab......
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 232
- Joined: Fri Sep 30, 2005 4:52 am
- Contact:
Please make rest of column col1, col2,col3 and col4 as key column also in datastage column defination tab......
Thanks,
Anupam
I mean to say use update action as replace existing row ..... in ODBC and make rest of column col1, col2,col3 and col4 as key column also in datastage column defination tab......ArndW wrote: I'm not sure what you mean by this suggestion - it won't affect the actual DELETE command at all.
Thanks,
Anupam
-
- Participant
- Posts: 232
- Joined: Fri Sep 30, 2005 4:52 am
- Contact:
-
- Participant
- Posts: 232
- Joined: Fri Sep 30, 2005 4:52 am
- Contact: