Hello,
I am curious.
NVL, DECODE and SELECT FROM dual are Oracle methods and these appear inyour code.
How did you make these work in Postgres?
Cheers,Rob