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 / 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 |
Where should yoU place the flat file to import the flat file defintion to the designer?
How to improve the performance of Aggregate transformation?
Can we create multiple integration service on single repository?
how remove 1st 3 records & last 3 records in informatics
How can we reset Sequence Generator, when we move objects from Dev Environment to QA env?
how can u approach u r client
my source like dis 10,asd,2000 10,asd,2000 10,asd,2000 20,dsf,3000 20,dsf,3000 20,dsf,3000 like dis and my requirement is first record is inserted into first target and duplicates of first record is inserted into second target ...like dis way ...? how to achieve dis?
What is data movement mode in Informatica and difference between them?
wht is cdc?how to use it in creation of mappings?
What is the use of incremental aggregation?
What are the reusable transformations?
To Provide Support For Mainframes Source Data, which Files Are Used As A Source Definitions?