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
Some flat files are there, out of these having some duplicate. How do you eliminate duplicate files while loading into targets?
Explain how to import oracle sequence into informatica?
Give some information on report bursting and how to do it in bca as I have to split the report and send different reports to different people?
lookup transformation with screenshots
In how many ways we can create ports?
When do you use sql override in a lookup transformation?
Write the unconnected lookup syntax and how to return more than one column.
What is the use of transformation?
What is informatica?
design of staging area?
What are the different transaction levels available in transaction control transformation?
without table how to come first record only in oracle?
what kind of issue you will get in environment? (we ll call help desk to raise ticket rite?
How do you update the records with or without using update strategy?
What do you mean by channel change?