Hi frnds, let me know the solution for this. i have emp table with eno, ename as columns with duplicate rows.Ex : eno ename 1 kiran 2 sena 3 naveen 1 kiran 4 dev 3 naveen 1 kiran 5 loki 3 naveen 1 kiran 6 shashi 1 kiran etc... so iwant to find out the third occurance of that duplicate row.i dont know where is that row . There r some millions of rows and so many duplicates for each row. plz suggest me if u know the answer. Thanks in advance.

Showing Answers 1 - 3 of 3 Answers

mithunmca

  • Jan 30th, 2007
 

hi i think that the following would give u an idea how to solve ur problem select distinct(ename) from emp_tab where empno in (select empno from(select empno,count(*) from emp_tab group by empno having count(*)>2));

chandra_rn

  • Feb 7th, 2007
 

i think this is query select * from emp where rowid > select max(rowid) from emp group by eno,ename

  Was this answer useful?  Yes

sai

  • Feb 14th, 2007
 

hi here is the answer
select * from t_name where rowid in (select rowid from t_name group by empno having count(*) =3);

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions