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

What are the different lookup cache(s)?

1033


EXL informatica Questions

1310


Differences between version 7.x and 8.x.

1840


Explain how many types of dimensions are available in informatica?

1007


Describe the impact of several join conditions and join order in a joiner transformation?

1008


What are the issues you have faced in your project? How did you overcome those issues?

2289


What are the static cache and dynamic cache in informatica?

1139


Enlist some properties of sessions.

1020


In which transformation you cannot drag ports into it?

1243


To import the flat file definition into the designer where should the flat file be placed?

1005


Explian the Process of deployment groups in informatica

990


What are the transformations that cannot be placed between the sort origin and the joiner transformation so that we do not lose the input sort order?

1107


What is workflow? What are the components of the workflow manager?

1065


what is mean by complex business rule ?

2109


What are the different versions of informatica?

1183