![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm trying to put together an SSIS package to remove duplicate rows from a flat file. Source: Flat file (EDI) Target: Flat file (EDI) The aggregate transformation seems to work, however, the output lines are in a random order. I need retain the line order and just remove the duplicate rows. Thanks for your help, Ken. |
#3
| |||
| |||
|
|
The Sort Transform has an option to remove duplicates. You will of course need to be able to select the correct sort order. -- Darren http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com | http://www.konesans.com "Ken McClaren" <kmcclare (AT) hotmail (DOT) com> wrote in message news:%23Bo%23GVj7GHA.3644 (AT) TK2MSFTNGP03 (DOT) phx.gbl... I'm trying to put together an SSIS package to remove duplicate rows from a flat file. Source: Flat file (EDI) Target: Flat file (EDI) The aggregate transformation seems to work, however, the output lines are in a random order. I need retain the line order and just remove the duplicate rows. Thanks for your help, Ken. |
#4
| |||
| |||
|
|
Again, this almost works, however the file is sorted incorrectly. I need a way to remove duplicate lines without changing the sort order fo the file. A simple sort and remove duplicates is not going to work. "Darren Green" <darren.green (AT) reply-to-newsgroup (DOT) sqldts.com> wrote in message news:uZJTIau7GHA.568 (AT) TK2MSFTNGP05 (DOT) phx.gbl... The Sort Transform has an option to remove duplicates. You will of course need to be able to select the correct sort order. -- Darren http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com | http://www.konesans.com "Ken McClaren" <kmcclare (AT) hotmail (DOT) com> wrote in message news:%23Bo%23GVj7GHA.3644 (AT) TK2MSFTNGP03 (DOT) phx.gbl... I'm trying to put together an SSIS package to remove duplicate rows from a flat file. Source: Flat file (EDI) Target: Flat file (EDI) The aggregate transformation seems to work, however, the output lines are in a random order. I need retain the line order and just remove the duplicate rows. Thanks for your help, Ken. |
#5
| |||
| |||
|
|
So you cannot re-sort ? Do this in two stages, and add a row number to start with, then sort for duplicates, then sort by row number. -- Darren http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com | http://www.konesans.com "Ken McClaren" <kmcclare (AT) hotmail (DOT) com> wrote in message news:uAaOnNV8GHA.3644 (AT) TK2MSFTNGP03 (DOT) phx.gbl... Again, this almost works, however the file is sorted incorrectly. I need a way to remove duplicate lines without changing the sort order fo the file. A simple sort and remove duplicates is not going to work. "Darren Green" <darren.green (AT) reply-to-newsgroup (DOT) sqldts.com> wrote in message news:uZJTIau7GHA.568 (AT) TK2MSFTNGP05 (DOT) phx.gbl... The Sort Transform has an option to remove duplicates. You will of course need to be able to select the correct sort order. -- Darren http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com | http://www.konesans.com "Ken McClaren" <kmcclare (AT) hotmail (DOT) com> wrote in message news:%23Bo%23GVj7GHA.3644 (AT) TK2MSFTNGP03 (DOT) phx.gbl... I'm trying to put together an SSIS package to remove duplicate rows from a flat file. Source: Flat file (EDI) Target: Flat file (EDI) The aggregate transformation seems to work, however, the output lines are in a random order. I need retain the line order and just remove the duplicate rows. Thanks for your help, Ken. |
![]() |
| Thread Tools | |
| Display Modes | |
| |