write a query for how to eliminate the duplicate rows
without using distinct?

Answers were Sorted based on User's Feedback



write a query for how to eliminate the duplicate rows without using distinct?..

Answer / mani

DELETE FROM EMP WHERE ROWID NOT IN (SELECT MAX(ROWID)FROM
EMP)GROUP BY EMPNO;

Is This Answer Correct ?    10 Yes 2 No

write a query for how to eliminate the duplicate rows without using distinct?..

Answer / madhu

DELETE FROM EMP WHERE ROWID NOT IN (SELECT MAX(ROWID)FROM
EMP GROUP BY EMPNO);

Is This Answer Correct ?    6 Yes 0 No

write a query for how to eliminate the duplicate rows without using distinct?..

Answer / abhishek kumar

select id from tgt_table group by id;

Is This Answer Correct ?    7 Yes 4 No

write a query for how to eliminate the duplicate rows without using distinct?..

Answer / czarabid

it's very simple the question is to delete the duplicated
records and it's solution is here
DELETE FROM TABLE_NAME1 t1 WHERE ROWID </> any(SELECT ROWID
FROM TABLE_NAME1 t2 WHERE t1.column1=t2.column1);
this will delete only the redundant records leaving only one
copy of the same records in the table.
If you want to delete all the records which are redundant
then the solution is here
DELETE from table_name1 t1 where rowid <> any (select rowid
from table_name1 t2 where t1.no=t2.no)

Is This Answer Correct ?    0 Yes 0 No

write a query for how to eliminate the duplicate rows without using distinct?..

Answer / murali udayagiri

Assume some duplicate data is there in emp table. Try the
below to eliminate duplicate.

select * from emp
union
select * from emp;


Thanks,
Murali Udayagiri

Is This Answer Correct ?    2 Yes 5 No

write a query for how to eliminate the duplicate rows without using distinct?..

Answer / bharu_295

select count(*),col1,col2 ..... from table_name
groupby col1,col2.....
having count(*)>1

Is This Answer Correct ?    2 Yes 9 No

Post New Answer

More Informatica Interview Questions

What is source qualifier transformation in informatica?

0 Answers  


What is the difference between SOURCE and TARGET BASED COMMITS?

3 Answers   IBM,


Describe two levels in which update strategy transformation sets?

1 Answers  


hi all hi have flat file like below my requirement is empid,ename,sal,loc 101,vamshi,5000,hyd 101,vamshi,5020,hyd 201,raju,5000,hyd 202,ram,4000,hyd 203,kumar,3500,pune 203,kumar,3500,pune 203,kumar,5000,hyd 203,kumar,6000,hyd i want the o/p like this in one target 201,raju,5000,hyd 202,ram,4000,hyd and in second target 101,vamshi,5000,hyd 101,vamshi,5020,hyd 203,kumar,3500,pune 203,kumar,3500,pune 203,kumar,5000,hyd 203,kumar,6000,hyd

9 Answers   IBM,


how can one come to know wether the records loak into the target if we use update strategy

1 Answers   Wipro,






What are the different components of powercenter?

0 Answers  


why we need informatica

2 Answers   HCL,


what are the Methods For Creating Reusable Transformations?

0 Answers   Informatica,


I need the output file in the below format using Informatica. __0946684800__ 6 1 3 1 5 1 6 1 10 1 6 10 Pos State Time Split AgentID Reason Spaces Code in Code Spare state ______ ___ _____ ______ __________ ______ 1234 14 0 4321 3103 abcd 4321 15 5 123452 3150 Can someone help please?? We need the data in space-delimited, fixed ASCII format .

0 Answers   Amazon,


yesterday my session run ten min.today its run 30min, wt is the reason? if any issues how to solve that?

2 Answers   iGate,


explain abt ur project architecture?

0 Answers   Anthem, DELL, IBM, TCS, Wipro,


what is the difference between lookupoveride and joiner?

3 Answers  


Categories