Removing duplicate lines based on a column value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • devguru
    New Member
    • May 2007
    • 1

    Removing duplicate lines based on a column value

    I have an interesting script to write.

    The idea is to "rollup" rows that only differ by one column and concatenate the column value. For example:

    xxxx a xxxxxxxxxxxx yyyyyyy zzzzzzzzzzzzzzz
    xxxx b xxxxxxxxxxxx yyyyyyy zzzzzzzzzzzzzzz
    1xxx a xxxxxxxxxxxx yyyyyyy zzzzzzzzzzzzzzz
    1xxx b xxxxxxxxxxxx yyyyyyy zzzzzzzzzzzzzzz
    2xxx a xxxxxxxxxxxx yyyyyyy zzzzzzzzzzzzzzz
    2xxx b xxxxxxxxxxxx yyyyyyy zzzzzzzzzzzzzzz
    2xxx c xxxxxxxxxxxx yyyyyyy zzzzzzzzzzzzzzz

    should produce:

    xxxx ab xxxxxxxxxxxx yyyyyyy zzzzzzzzzzzzzzz
    1xxx ab xxxxxxxxxxxx yyyyyyy zzzzzzzzzzzzzzz
    2xxx abc xxxxxxxxxxxx yyyyyyy zzzzzzzzzzzzzzz

    Help please :)
  • KevinADC
    Recognized Expert Specialist
    • Jan 2007
    • 4092

    #2
    What have you tried so far?

    Comment

    Working...