Duplicate Rows

From: <artmerar_at_yahoo.com>
Date: Fri, 25 Jul 2008 21:33:28 -0700 (PDT)
Message-ID: <67fb7670-5142-440f-9cc3-33c9ee914ebc@c65g2000hsa.googlegroups.com>

Hi,

I figured I'd ask this too. I know how to remove duplicate rows from a table, but this example used an analytical function. I'm new to these and do not get a huge chance to use them, so I'm always forgetting how they work.

Please see this:

select * from customer
where rowid in
 (select rowid from
   (select

     rowid,
     row_number()
    over
     (partition by customer_id order by customer_id ) dup
    from customer)
  where dup > 1);

Ok, that did show me the duplicates, but what if a duplicate was made up of more than 1 column? Can I still use an analytical function?

This is where I might learn about these things......

Thank you. Received on Fri Jul 25 2008 - 23:33:28 CDT

Original text of this message