Re: Remove duplicates from table

From: trub3101 <trub3101_at_sky.com>
Date: Sat, 18 Apr 2009 06:40:34 -0700 (PDT)
Message-ID: <146324ae-78c3-4d31-a767-ca2c69c7ac82_at_e18g2000yqo.googlegroups.com>



On 18 Apr, 14:34, trub3101 <trub3..._at_sky.com> wrote:
> On 18 Apr, 14:01, trub3101 <trub3..._at_sky.com> wrote:
>
>
>
>
>
> > Hi Guys,
>
> > Could really do with you assistance here!
>
> > I have table test
>
> > test_id number(11) PK
> > test_name varchar2(100)
> > start_time date
> > end_time date
>
> > In essence I need remove the duplicate records from the table so that:
>
> > 1|football|19/04/2009 17:15|19/04/2009 20:00
> > 2|football|19/04/2009 17:15|19/04/2009 20:00
> > 3|football|19/04/2009 17:15|19/04/2009 20:00
> > 4|football|19/04/2009 17:15|19/04/2009 20:00
> > 6|cricket|19/04/2009 13:15|19/04/2009 22:00
> > 7|cricket|19/04/2009 13:15|19/04/2009 22:00
> > 8|cricket|19/04/2009 13:15|19/04/2009 22:00
> > 9|cricket|19/04/2009 13:15|19/04/2009 22:00
>
> > becomes;
>
> > 1|football|19/04/2009 17:15|19/04/2009 20:00
> > 6|cricket|19/04/2009 13:15|19/04/2009 22:00
>
> > Your help would truly appreciated with this one!
>
> > Thanks in advance,
>
> > tb3101
>
> Hi all,
>
> Sorry, my bad! The schema is actually has two tables the other being:
>
> test2
> test2_id number(10) pk
> name varchar2(100)
>
> 134|cricket
> 367|football
> 552|golf
>
> So
>
> 1|367|19/04/2009 17:15|19/04/2009 20:00
> 2|367|19/04/2009 17:15|19/04/2009 20:00
> 3|367|19/04/2009 17:15|19/04/2009 20:00
> 4|367|19/04/2009 17:15|19/04/2009 20:00
> 6|134|19/04/2009 13:15|19/04/2009 22:00
> 7|134|19/04/2009 13:15|19/04/2009 22:00
> 8|134|19/04/2009 13:15|19/04/2009 22:00
> 9|134|19/04/2009 13:15|19/04/2009 22:00
>
> becomes;
>
> 1|367|19/04/2009 17:15|19/04/2009 20:00
> 6|367|19/04/2009 13:15|19/04/2009 22:00- Hide quoted text -
>
> - Show quoted text -

My bad again!

1|367|19/04/2009 17:15|19/04/2009 20:00
6|367|19/04/2009 13:15|19/04/2009 22:00 should be:

1|367|19/04/2009 17:15|19/04/2009 20:00
6|134|19/04/2009 13:15|19/04/2009 22:00

Think that's it!

Thanks in advance

tb3101 Received on Sat Apr 18 2009 - 08:40:34 CDT

Original text of this message