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 |
i have 6 char field in program, but this field is using in all files i want to chage field size as 10 char , how can i do this except using *like defn...?
What is the diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?
how to convert date format from one format to another i think in CL/400 its CVTDAT,Please tell in RPG/400 sir not in RPGILE
How can we make use of SETLL operation in CL?
what is the necessary keyword needed to scroll subfile records?
1.Suppose my file has 10 fields and I want to make the 2nd field Zeros in all records. And assume I have millions of records and I dont want to read each record and update the desired field with 0. Any other way to do this in one step operation? 2. Assume my file has 100 records and I want to see only first 10 records. Is this possible through LF? 3.I have 3 jobs A B and C. I want to submit B after successful completion of A and want to submit C after successful completion of B. Without using job scheduler or job queue, how can i do that through CL program? 4.What is difference between Bind by copy and bind by reference?
Hi, Can anybody give me real sinario for SFLRCDNBR?with example?
Q1.How to read the Array? Q2.How to copy the content of one Array to another Array?
Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg
What is significance of a file designated as a Primary file in Rpg400 program....also what's use of secoundry file
what is the use of sflnxtchg?
1) How to declare a file? 2) How to define a display file? 3) How to monitor error messages in RPG? 4) How to find the attributes for subfiles? and what is the DDS for subfiles?