create table t1 ( c1 varchar2(20), c2 varchar2(20), c3 varchar2(20), c4 varchar2(20))
Table created.
insert into t1 values ('John','Kennedy','Marc','Guy')
1 row(s) inserted.
insert into t1 values ('John','Kennedy','Olivier','Oslo')
1 row(s) inserted.
insert into t1 values ('not','john','vijay','balebail')
1 row(s) inserted.
commit
Statement processed.
select t1.*, count(c1||c2) over (partition by c1,c2 order by c1,c2 ) flag from t1
C1 | C2 | C3 | C4 | FLAG | John | Kennedy | Marc | Guy | 2 | John | Kennedy | Olivier | Oslo | 2 | not | john | vijay | balebail | 1 |
---|
select t1.*, decode (count(c1||c2) over (partition by c1,c2 order by c1,c2 ),1,0,1) flag from t1
C1 | C2 | C3 | C4 | FLAG | John | Kennedy | Marc | Guy | 1 | John | Kennedy | Olivier | Oslo | 1 | not | john | vijay | balebail | 0 |
---|
set echo on
Unsupported Command
select t1.*, count(c1||c2) over (partition by c1,c2 order by c1,c2 ) flag from t1
C1 | C2 | C3 | C4 | FLAG | John | Kennedy | Marc | Guy | 2 | John | Kennedy | Olivier | Oslo | 2 | not | john | vijay | balebail | 1 |
---|
select t1.*, decode (count(c1||c2) over (partition by c1,c2 order by c1,c2 ),1,0,1) flag from t1
C1 | C2 | C3 | C4 | FLAG | John | Kennedy | Marc | Guy | 1 | John | Kennedy | Olivier | Oslo | 1 | not | john | vijay | balebail | 0 |
---|