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 Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts Inserting records based on conditions vickey_dw DFSORT/ICETOOL 9 Wed Feb 22, 2017 1:33 pm
No new posts To Merge mutliple records into a sing... anandgbe DFSORT/ICETOOL 6 Wed Feb 22, 2017 8:49 am


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