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 |
How can we search particular records from the database file in RPG. For example, there are 100 records in the file.i need to retrieve all the records matching/equal to the particular 'NAME' field. How can we do the above using SEARCH criteria other than using the IF cond?
2. Which of the following statement(s) explains the difference(s) between the /INCLUDE and ICOPY directives? a.) No difference, they function the same b.) ACOPY cannot be used as a conditional directive c.) IINCLUDE files cannot contain embedded SQL d.) Nesting /TNCLUDE directives is not allowed
what is post opcode do
steps for debugging two rpg programs????
What is the purpose of PUTOVR keyword?
difference between CHAIN and READE?
Suppose we add one field in physical file and this physical file is used by several programs.how do we know which program is using that file? What are the impact analysis.
Job is in MSGW while reading the input file and writing a new record / updating a reacod due to Duplicate data error. What action would you take ( C D I R )...?
Hi,This is raju.Can any body give me the real experience answer for this question? 1.What is the significance of *MAP and *DROP in the CPY command?
how we retrieve records without using key field (ex:name) from Physical File through RPG in as/400?
how do I do concatenation in rpg iv, like I do in cl?
How we will read call stack?