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 a sql query following table?
col1 col2
1 2
1 2
1 2
3 4
3 4
5 6
i want the output like

unique duplicate
col1 col2 col1 col2
1 2 1 2
3 4 1 2
5 6

Answer Posted / vaibhav jogale

We can achieve this using With clause
insert into TEST_UNIQ (col1,col2)
with Ct_Test as (
select col1,col2,row_number () over (partition by col1,col2 order by col1,col2)Rw_no
from test123)
select col1,col2 from Ct_Test where rw_no=1
/

insert into TEST_DUp (col1,col2)
with Ct_Test as (
select col1,col2,row_number () over (partition by col1,col2 order by col1,col2)Rw_no
from test123)
select col1,col2 from Ct_Test where rw_no>1
/

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how to import oracle sequence into informatica?

947


can anybody send me some real time screenshots of mapping in informatica powercenter. i will be vary thankful to him. my e-mail id :- prakashkumar.kumhar@gmail.com

4677


What are ETL Tools?

1040


What are active transformations.

1592


How to load last n records of file into target table - informatica

1019


What is native users?

1100


What are junk dimensions?

1020


Tell me about MD5 functions in informatica

874


What is union transformation in informatica?

1097


can u any challenge your project?

1972


How do you remove duplicate records in informatica? And how many ways are there to do it?

1110


Name the different lookup cache(s)?

1158


Why filter transformation is an active one?

929


How you prepared reports for OLAP?

1545


What are multi-group transformations?

1011