Hello friends ,
First of all.
I am working on production environment (Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production) and that's why i can't create any DB object like DBLINK or function etc.
Now I am supposed to write a sql query to fetch some data from few tables.
I have completed every part of the query except this one.
here we have a table like :
COLA | COLB |
---|
A1 | B1 |
B1 | C1 |
C1 | D1 |
D1 | E1 |
A2 | B2 |
B2 | C2 |
AA | BB |
BB | YY |
YY | SS |
SS | ZZ |
ZZ | NN |
NN | HH |
Requirement here is to pass one value to cola in the query like cola = 'A1' and it should return 'E1' , if i am passing value as cola = 'C1' then still I should get 'E1' as output.
same with other rows
COLA = 'A1' output : 'E1'
COLA = 'B1' output : 'E1'
COLA = 'C1' output : 'E1'
COLA = 'D1' output : 'E1'
COLA = 'A2' output : 'C2'
COLA = 'B2' output : 'C2'
COLA = 'AA' output : 'HH'
COLA = 'BB' output : 'HH'
COLA = 'YY' output : 'HH'
COLA = 'SS' output : 'HH'
COLA = 'ZZ' output : 'HH'
COLA = 'NN' output : 'HH'
Note: we will pass only one value at a time and it will be for COLA . we can not create any DB object or anonymous block. Apart from that , we are free to use any system defined function.
Please help me to solve this issue I am way much close to the dead line and still can't find any logic.