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



write a sql query following table? col1 col2 1 2 1 2 1 2 3 4 3 4 5 6 ..

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

More Informatica Interview Questions

how to we create datamart?

2 Answers   HSBC,


What is partioning?how many types of partinings are there

2 Answers   HCL,


Give one example for each of conditional aggregation, non-aggregate expression, and nested aggregation?

0 Answers  


Hi, Can anyone just give me the list of all versions of Informatica ? Advance Thanks

2 Answers   IBM,


Hi, This is Ranadheer. How to load fact tables using dimeension tables. Please anyone give me a answer with example. Thanks in Advance.

1 Answers  


what are the transformations that are used in data cleansing ? and how data cleansing takes place ?

3 Answers  


What are the various test procedures used to check whether the data is loaded in the backend, performance of the mapping, and quality of the data loaded in informatica?

0 Answers  


Hi, source data is col1 values are 5,6,7 col2 are 3,2,1 col3 are 8,9,10 and i want to get target as col1 5,6,7 col2 1,2,3 col3 8,9,10 how to do this one?

6 Answers  


How do you do error handling in Informatica?

1 Answers  


what transformations are used for Variable port?

2 Answers  


Mention few advantages of router transformation over filter transformation.

0 Answers  


What is the difference between unicode & ascii mode data movement in informatica?

1 Answers   TCS,


Categories