Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Removing unnecessary duplicate records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
rajkan24

New User


Joined: 21 Feb 2005
Posts: 6
Location: India

PostPosted: Thu Feb 24, 2005 11:19 am    Post subject: Removing unnecessary duplicate records
Reply with quote

hi friends,



Have a nice day to you all.

I have one doubt in db2. Can anyone help me.

Question:-

In a Table there are many duplicate records. I want to delete the duplicate records, at the same time i want to maintain each one copy in that duplicate records. I want to know the query for this.would you please help me?????????. bye.


Rajesh.
Back to top
View user's profile Send private message

khannay2k

New User


Joined: 24 Feb 2005
Posts: 28
Location: Bangalore

PostPosted: Thu Feb 24, 2005 2:38 pm    Post subject:
Reply with quote

[color=darkblue][/color]
Hi Rajesh,
rajesh here again.
this is the syntax to remove the duplicates.

[b]Delete From Table1Where Id In (Select Id From Tabel1 As Temp Group By Id Having Count(*) >1) [/b]

Khanna
Back to top
View user's profile Send private message
rajkan24

New User


Joined: 21 Feb 2005
Posts: 6
Location: India

PostPosted: Sat Feb 26, 2005 9:38 pm    Post subject: hi khanna
Reply with quote

hi khanna,



thanks for your reply.Are sure with ur query?.Did u check it whether its working or not?.please reply bye.


regards,
R.Rajesh.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us