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
What is a shortcut and copy in Informatica and how two are different with each other?
Suppose we have two source qualifier transformations sq1 and sq2 connected to target tables tgt1 and tgt2 respectively. How do you ensure tgt2 is loaded after tgt1?
Differentiate between router and filter transformation?
How can we send the flat file data to different targets(which are also flat files) based on the name of flat file with out adding extra columns?
How to load the data from a flat file into the target where the source flat file name changes daily?
suppose in my source flatfile i have 10000 records in that some of master table records missed table records missed then what will u do
Explain sessions. Explain how batches are used to combine executions?
What is the procedure for creating independent data marts from informatica 7.1?
What do you mean by channel change?
What is a filter transformation and why it is an active one?
What is Data Caches size?
Explain dynamic target flat file name generation in informatica
How to load a Dimension ? and how to load a fact table?
where to store informatica rejected data? How to extract the informatica rejected data?
How do you handle two sessions in Informatica