Re: Remove duplicates from table
From: trub3101 <trub3101_at_sky.com>
Date: Sat, 18 Apr 2009 06:34:14 -0700 (PDT)
Message-ID: <3f594d77-527d-454d-a174-e326963e84ac_at_h28g2000yqd.googlegroups.com>
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
Date: Sat, 18 Apr 2009 06:34:14 -0700 (PDT)
Message-ID: <3f594d77-527d-454d-a174-e326963e84ac_at_h28g2000yqd.googlegroups.com>
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
Received on Sat Apr 18 2009 - 08:34:14 CDT