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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to remove duplicate rows everytime when a session is run?

Status
Not open for further replies.

newbieinfo

IS-IT--Management
Feb 2, 2005
1
US
i'm a newbie in inforatica. please help me out with the following two quetions..
1) I have a flat file with 248 rows and when run the session i get 248 rows in target table ,but if i run it again i get 496 rows(248 +248) in target. But i want to know how to get the same 248 rows regardless on number of times i run the session???
2) Even if i add a new row,udpate or delete i want it to be reflected on the target.

i guess i gotta use lookup transformation? is tht a good idea?

Thanks in Advance
 
newbie,

If you can define a primary key on the target-table, you can choose to run an update/insert strategy.

If this is not possible you can always apply the truncate option whereby data is first deleted from the target-table and THEN new data is inserted.

This is all very thoroughly described in the excellent INFA manuals. Please react if you need further guidance...

Ties Blom
Information analyst
 
You can use a sorter transformation and check the distinct row checkbox in the property sheet of Sorter transformation. This checks the distinct row and populates in the target
 
vaass,

that is exactly the answer to the caption
Code:
'How to remove duplicate rows every time when a session is run'

However, in the body of the thread it appears to be a different issue. In fact it is a mix of issues.

If you want to get exactly the same population of a table, then use an insert strategy and truncate the target.

If you want to mark records within the target with the label 'updated' / 'inserted' then one would need to use a data-driven strategy with update strategy transformations and a lookup

Ties Blom
Information analyst
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top