Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 MXG - Processing Compressed DB2 SMF r... vasanthz All Other Mainframe Topics 2 Thu May 10, 2018 12:47 am
No new posts Removing the period or dot from the v... gopinak COBOL Programming 6 Wed May 09, 2018 1:53 pm
No new posts Duplicate PARM on OUTFIL sancraig16 SYNCSORT 11 Thu Apr 05, 2018 10:25 pm
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us