Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Can we use procedural logic inside infromatica? If yes how, if now how can we use external procedural logic in informatica?

1079


Describe the scenarios where we go for joiner transformation instead of source qualifier transformation?

1164


What is the difference between informatica 7.0 and 8.0?

1050


What is meant by target load plan?

1028


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

1160


Suppose we have a source qualifier transformation that populates two target tables. How do you ensure tgt2 is loaded after tgt1?

1138


In What Situations we can use MappingParameters ,Mapping Variables AND Session Parameters in REAL TIME.

2104


What are the tasks that can be performed using sq?

1140


What is the Rank index port in Rank transformation?

1102


What is the way to execute pl/sql script using informatica mapping?

1681


What is the status code in stored procedure transformation?

1232


What are the transformations that are not supported in mapplet?

1084


How to Create a folder using pmrep command?

1221


Enterprise data warehouse your projects phase by phase explain?

1964


How you prepared reports for OLAP?

1656