dbTalk Databases Forums  

Remove duplicates from table

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Remove duplicates from table in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
trub3101
 
Posts: n/a

Default Remove duplicates from table - 04-18-2009 , 08:01 AM






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




Reply With Quote
  #2  
Old   
trub3101
 
Posts: n/a

Default Re: Remove duplicates from table - 04-18-2009 , 08:34 AM






On 18 Apr, 14:01, trub3101 <trub3... (AT) sky (DOT) com> wrote:
Quote:
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





Reply With Quote
  #3  
Old   
trub3101
 
Posts: n/a

Default Re: Remove duplicates from table - 04-18-2009 , 08:40 AM



On 18 Apr, 14:34, trub3101 <trub3... (AT) sky (DOT) com> wrote:
Quote:
On 18 Apr, 14:01, trub3101 <trub3... (AT) sky (DOT) 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



Reply With Quote
  #4  
Old   
trub3101
 
Posts: n/a

Default Re: Remove duplicates from table - 04-18-2009 , 08:59 AM



On 18 Apr, 14:40, trub3101 <trub3... (AT) sky (DOT) com> wrote:
Quote:
On 18 Apr, 14:34, trub3101 <trub3... (AT) sky (DOT) com> wrote:





On 18 Apr, 14:01, trub3101 <trub3... (AT) sky (DOT) 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- Hide quoted text -

- Show quoted text -
Okay everyone,

I have decided to close this thread because the details I have
submitted is not quite correct.

I will re-submit when I have the full facts.

Sorry about this but please do not bother to reply to this post!!!

Thanks tb3101


Reply With Quote
  #5  
Old   
Michel Cadot
 
Posts: n/a

Default Re: Remove duplicates from table - 04-18-2009 , 01:10 PM




"trub3101" <trub3101 (AT) sky (DOT) com> a écrit dans le message de news: 32d0330c-7d25-4dc4-aa1d-afb31d523f85...oglegroups.com...
Quote:
On 18 Apr, 14:40, trub3101 <trub3... (AT) sky (DOT) com> wrote:
On 18 Apr, 14:34, trub3101 <trub3... (AT) sky (DOT) com> wrote:





On 18 Apr, 14:01, trub3101 <trub3... (AT) sky (DOT) 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- Hide quoted text -

- Show quoted text -

Okay everyone,

I have decided to close this thread because the details I have
submitted is not quite correct.

I will re-submit when I have the full facts.

Sorry about this but please do not bother to reply to this post!!!

Thanks tb3101
We will wait you'll post the correct requirements
along with a complete test case (create table and insert statements)
and the result you want with these test case data
and your version of Oracle.

Regards
Michel




Reply With Quote
  #6  
Old   
Michael Austin
 
Posts: n/a

Default Re: Remove duplicates from table - 04-18-2009 , 09:34 PM



trub3101 wrote:
Quote:
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



or you could just Http://lmgtfy.com/?q=oracle+remove+duplicate+join


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.