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 / anto

unique

select distinct name,id from table

duplicate

select name,id from table
group by name,id
having count(name||id) > 1

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is update strategy transform?

696


source : xml file target: xml file how can we check data loaded into target xml file using writing sql query. pls help on this asap.

2384


What is a predefined event?

751


What are the tasks that can be performed using sq?

693


What is the surrogate key?

741






Separate from an archive server and a powerhouse?

579


How do you update the records with or without using update strategy?

756


What is informatica etl tool?

644


Is it possible to define a single node as a Gateway node as well as worker node?

763


Under what conditions selecting sorted input in aggregator will still not boost session performance?

717


COM components can be used in Informatica

1982


How to improve the performance of a session using sorter transformation?

790


What differs when we choose the sorted input for aggregator transformation?

669


My source is delimited flat file Flat file data is H|Date D1|ravi|bangalore D2|raju|pune T|4 The data will be send to target if the fallowing two conditions satisfied 1.The first row Date column is equal to SYSDATE 2.Last record second port equal to number of records. How to achieve?

5780


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?

1732