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
Explain how to import oracle sequence into informatica?
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
What are ETL Tools?
What are active transformations.
How to load last n records of file into target table - informatica
What is native users?
What are junk dimensions?
Tell me about MD5 functions in informatica
What is union transformation in informatica?
can u any challenge your project?
How do you remove duplicate records in informatica? And how many ways are there to do it?
Name the different lookup cache(s)?
Why filter transformation is an active one?
How you prepared reports for OLAP?
What are multi-group transformations?