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
How can you define user defied event?
Have you worked with/created Parameter file
Mention some types of transformation?
what is the Default Source Option For Update Strategy Transformation?
what is granularity,what type of granularity we will take in fact tables either lowlevel or highlevel,if two tables having same granularity that is posiable or not
How can we use mapping variables in informatica? Where do we use them?
How many ways are there to create ports?
What is the function of aggregator transformation?
What do you understand by SOA of Informatica?
Source and Target are flat files, Source table is as below ID,NAME 1,X 1,X 2,Y 2,Y On Target flat file i want the data to be loaded as mentioned below ID,NAME,REPEAT 1,X,2 1,X,2 2,Y,2 2,Y,2 How to achieve this, Can i get a map structure
As union transformation gives UNION ALL output, how you will get the UNION output?
How to extract the informatica rejected data?
What is a passive transformation?
What are mapplets? How is it different from a Reusable Transformation?
What happens when a session fails and you click on recover?