NVL2 in PL/SQL
Hello everyone,
I've just found out today that the NVL2 function couldn't be directly used in PL/SQL:
Connected to Oracle Database 11g Release 11.2.0.3.0
Connected as gva
SQL>
SQL> declare
2 dummy varchar2(10);
3
4 begin
5 dummy := NVL2('OK', '1', '0');
6 end;
7 /
declare
dummy varchar2(10);
begin
dummy := NVL2('OK', '1', '0');
end;
ORA-06550: Ligne 6, colonne 15 :
PLS-00201: l'identificateur 'NVL2' doit être déclaré
ORA-06550: Ligne 6, colonne 6 :
PL/SQL: Statement ignored
SQL>
Quite amazing, considering the NVL function can be used this way.
The closest Note I could find is Doc ID 344191.1 : Using NVL2 Function in PL/SQL Fails With PLS-00201