write s sql query following table some duplicate present i
want unique one column duplicate another column display?

name id
a 1
a 1
b 2
b 2
c 3
i want the required output like
unique duplicate
name id name id
a 1 a 1
b 2 b 2
c 3

Answer Posted / senthil

select a.nameid as unique_name_id,b.nameid as DUplicate_name_id
from
(select distinct nameid from name) a
left outer join
(select nameid from name group by nameid having count(*) > 1) b
on a.nameid = b.nameid

Output:
---------
unique_name_id Duplicate_name_id
a 1 a 1
b 2 b 2
c 3

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If informatica has its scheduler why using third party scheduler?

797


what are the fact table & dimensional table in pharmaceutical and hospotal related products???

1707


What is joiner transformation?

591


tell me the rules and responsblites in our project(my project is development)

1514


Difference between Data and Index Caches?

668






Design a mapping to get the pervious row salary for the current row. If there is no pervious row exists for the current row, then the pervious row salary should be displayed as null.

793


What will happen if the select list columns in the custom override sql query and the output ports order in sq transformation do not match?

560


What are the differences between joiner transformation and source qualifier transformation?

636


How many input parameters can exist in an unconnected lookup?

1022


Informatica Server and Client are in different machines. You run a session from the server manager by specifying the source and target databases. It displays an error. You are confident that everything is correct. Then why it is displaying the error?

1524


What is deployment group?

696


Explain in detail scd type 2 through mapping.

630


What is the use of target designer?

620


What is standalone command task?

723


What is exclusive and normal mode for repository services?

727