I have a simple query:
Select A, NVL(C1,0), NVL(decode(C2,'YES','GOOD','BAD'),'UNKNOWN')
FROM T1;
I wan't a function which accepts the above query as input and returns the following query (string NOT the execution result) as output:
Select A || NVL(C1,0) || NVL(decode(C2,'YES','GOOD','BAD'),'UNKNOWN')
FROM T1;
Select A, NVL(C1,0), NVL(decode(C2,'YES','GOOD','BAD'),'UNKNOWN')
FROM T1;
I wan't a function which accepts the above query as input and returns the following query (string NOT the execution result) as output:
Select A || NVL(C1,0) || NVL(decode(C2,'YES','GOOD','BAD'),'UNKNOWN')
FROM T1;