cancel
Showing results for 
Search instead for 
Did you mean: 

Delete Duplicate rows in Data Package based on selection

Former Member
0 Kudos

Hello experts,

I have the data coming from Oracle using DB_Connect. The data has duplicate order no. I need to delete the duplicate rows in the data package based selection before updating the data target.

I am thinking of writing this in updaterule start routine. I would greatly appreciate any sample code on selective deletion of data package rows.

Thanks a lot!

Sri

Accepted Solutions (1)

Accepted Solutions (1)

udayabhanupattabhiram_cha
Active Contributor
0 Kudos

Hi:

Since you are not assigning an InfoObject and for performance, you should write this code in the Start Routine of "Transfer Rules", NOT Update Rules.

So, you should use 'DATAPAK' instead of DATA_Package.

DELETE ADJACENT DUPLICATES FROM DATAPAK COMPARING PROCESSID.

Here, PROCESSID is the Technical FIELD name from your DB COnnect View.

Hope this helps.

Ram Chamarthy

Former Member
0 Kudos

Yes you need to write in the UR start routine.

all the best.

Regards,

Nagesh Ganisetti.

  • assign points if useful.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Vani,

If you know the specific order number then you don’t need to write a routine and you could do this with selective deletion option either in ODS or cube. This is what you are look for?

Hope this helps you,

Bye,

Naga.

Former Member
0 Kudos

Nagesh,

Thanks for your reply.

Do I need write this in Update Start routine?

Another thing the order number field is coming from source system. Currently we are not mapping/assingning to InfoObject. In other words we are not seding order no to data target.

In my query can I write something like this...

DELETE ADJACENT DUPLICATES FROM DATA_PACKAGE COMPARING DATA_Package-OrderNo

Thanks a lot!

Sri

Former Member
0 Kudos

Sri Vani,

Create a Start Routine for this.

use <b>DELETE DUPLICATES FROM DATA_PACKAGE COMPARING <ORDER NUMBER TECHNICAL NAME>.</b>

include soem more fields if you want to compare.

all the best.

Regards,

Nagesh Ganisetti.