Need a sql query: retrive all duplicate records in table
Answers were Sorted based on User's Feedback
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 |
Answer / kusum
For duplicate records retrieval::::
Select * from employee a where rrn(employee) > (select
min(rrn(employee)) from employee b where a.empno = b.empno)
Is This Answer Correct ? | 4 Yes | 0 No |
Can AnyOne tell me how to read join logical file in rpg from starting to end?
What is the diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?
1.What is the Maximum field length we can declare in RLU?? 2. What is the difference if your designing RLU using DDS and using the option 19 for the RLU??
If record-format name in an externally-described file has already been defined as a file-name.how to solve this?
How to get only unique records from a file which contains duplicate data using CPYF command ? Example : FILEA has duplicate records and FILEB is a UNIQUE defined.... and I want to get the data from FILEA to FILEB by eliminating all the duplicate records...
How to print Superscript / Subscript from RPG400
When a object will be locked & when a record will be locked? Plz explain.
what is the rpg system?
how we create binder member for updating service program and where we type this code on command line or in program ? strpgmexp pgmlvl(*current) export symbol (xyz0 endpgmexp. plz explain me this step by step .
we hav job which is running as batch. it takes atleast 06hours to complete tht job. bu i wana do tht job with in 3hours.........? so plz post ur answers
How can we find out whether the job is interactive or Batch through RPG program? 2) How can we find out through CL program?
I have file with data as follows data 1 2 3 4 5 I need to read 1 and 5 ,then 2 and 4 then like.. upto end of file, can any one help on this