Version pour
double precision avec choix de
valeur de sortie non NULL
Fonctions en appui pour Oracle NVL.
TestSQL
SELECT 'is NULL' AS ISCORRECT, F_SNVL(NULL, 'is NULL') FROM
RDB$DATABASE;
SELECT 'this is not NULL' AS ISCORRECT, F_SNVL('this is not NULL',
'is
NULL') FROM RDB$DATABASE;
SELECT 'is NULL' AS ISCORRECT, F_SNVL2(NULL, 'not NULL', 'is NULL')
FROM RDB$DATABASE;
SELECT 'not NULL' AS ISCORRECT, F_SNVL2('this is not NULL', 'not
NULL',
'is NULL') FROM RDB$DATABASE;
SELECT 9999 AS ISCORRECT, F_INVL(NULL, 9999) FROM RDB$DATABASE;
SELECT 3 AS ISCORRECT, F_INVL(3, 999) FROM RDB$DATABASE;
SELECT 9999 AS ISCORRECT, F_INVL2(NULL, 999, 9999) FROM
RDB$DATABASE;
SELECT 123 AS ISCORRECT, F_INVL2(3, 123, 9999) FROM RDB$DATABASE;
SELECT 0.0001 AS ISCORRECT, F_DNVL(NULL, 0.0001) FROM RDB$DATABASE;
SELECT 3.0 AS ISCORRECT, F_DNVL(3.0, 0.0001) FROM RDB$DATABASE;
SELECT 0.0001 AS ISCORRECT, F_DNVL2(NULL, 3.333, 0.0001) FROM
RDB$DATABASE;
SELECT 3.333 AS ISCORRECT, F_DNVL2(3.0, 3.333, 0.0001) FROM
RDB$DATABASE; |