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 meant by lookup transformation?

0 Answers  


What are the new features of informatica 7.1?

2 Answers  


What is native users?

0 Answers  


in which situations do u go for scds ?

3 Answers   TCS,


there is a product table prodid prodname price 100 cinthol 10 101 hamam 10 102 neem 20 103 cake 30 in the above table the price of some products are duplicated and some product prices are distinct we want to push the duplicated prices to one target and non-duplicated prices to other target without using expression and sequence generator transformation

4 Answers  






Can we get 1st record through Informatica(without sequence number).

0 Answers  


please let me know which type of question arise in interview on project manager round on insurance project with answer pls reply asap.

1 Answers   Accenture,


What do you mean by filter transformation?

0 Answers  


we have three columns and two rows. col1 col2 col3 a b c want to change into 2 columns and 3 rows ,how? col1 a col2 b col3 c which transformation u'll use and how?

3 Answers   Cognizant,


One source and 3 targets 1st row-1st target 2nd row-2nd target 3rd row-3rd target 4th row-1ist target how will u do?

5 Answers   HCL,


How to display last 5 records in a table ? With out Top key word and doing order by desc Advance thanks

2 Answers   Puma,


when do we use static cache and when do we use dynamic cache in lookup transformation? with example.

1 Answers  


Categories