write a sql query following table?
col1 col2
1 2
1 2
1 2
3 4
3 4
5 6
i want the output like

unique duplicate
col1 col2 col1 col2
1 2 1 2
3 4 1 2
5 6



write a sql query following table? col1 col2 1 2 1 2 1 2 3 4 3 4 5 6 ..

Answer / vaibhav jogale

We can achieve this using With clause
insert into TEST_UNIQ (col1,col2)
with Ct_Test as (
select col1,col2,row_number () over (partition by col1,col2 order by col1,col2)Rw_no
from test123)
select col1,col2 from Ct_Test where rw_no=1
/

insert into TEST_DUp (col1,col2)
with Ct_Test as (
select col1,col2,row_number () over (partition by col1,col2 order by col1,col2)Rw_no
from test123)
select col1,col2 from Ct_Test where rw_no>1
/

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Informatica Interview Questions

There are 4 source files which contains same metadata create target that should display the file name along with record please send answer with mapping

3 Answers   Wipro,


How the informatica server sorts the string values in Rank transformation?

1 Answers   Informatica,


Design a mapping to get year of join for each employee.

4 Answers   Accenture,


How can we create index after completion of load process?

0 Answers  


Mapping variables, parameters syntax, if you create mapping variables and parameters in mapplet can you use them in the mapping?

1 Answers  






Work flow failed when it is set to Bulk mode but it was successful when set to normal mode y??(All the connections are fine and exactly correct)?

11 Answers   Wipro,


What is a node in Informatica?

0 Answers  


what is the purpose of surrogate key and diff between primary key&surrogate key

1 Answers   Cap Gemini,


in performance wise union is past,union all is past

2 Answers  


what is threshold error in informatica?

1 Answers   TCS, Wipro,


i have two flat files.. containing same type of data i want to load it to dwh..how many source qualifires i need

7 Answers   Deloitte,


How can we use mapping variables in informatica?

0 Answers  


Categories