Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Need a sql query: retrive all duplicate records in table

Answer Posted / chiranjeevi ch

let us assume we have some duplicate records in sample table
and we can identify duplicates with eid.

The the query looks like this.

Select * from sample
where eid=any
(select eid from sample having count(eid)>1 group by eid);

Note: This should be used SQl .. but i never tried in as400
when ever it is necessary means i use following sql
statement in as400 .......

select * from sample where eid=111

it displays all duplicate records related to 111

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

do you use message subfiles? What are the necessary keywords required coding a message subfile?

1134


during execution, an rpg/400 program automatically follows a sequence of operations for each record that is processed. The built-in program cycle includes the following logical steps.

1223


write an RPG program to calculate the marks of 5 students (A,B, C, D, E)in 3 different subjects (eng, math, sci) an display on the screen

1309


When we have a file with Duplicate records and I want to read the unique record from the file. For example a file containing Emp Name as 'Ram' and there are 3 entries of it. So how to read a unique record from File?

961


can anybody help me to solve this problem. the program that i m checking display error message saying "Record format for file AJDSPFFD does not match model file and decimal error. how to solve this problem. The AJDSPFFD is snapshot the AJTLOG that is the audit trail list.

2805


what do you mean by an input subfile, what are the keywords required?

1261


How to call one program from another program in RPG? please help me with the code

1732


What is the diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?

3002


are there any useful c runtime apis that I can call from rpg iv?

1167


Hi Viewers can any body explain me how to update and ahange the already existed data in physical file using subfile ? please explain me with the code if possible?

5142


thanks mr.Harshad R Suryawaunshi,i'm new to as400 i think you are telling in rpgile i know only rpg400 if possible can you tell in rpg400

2315


how do I declare a table or array in rpg iv?

1180


what is an online rpg?

1266


what are the key words you must use when using a subfile?

1186


what is the use of sflnxtchg?

1263