What is the NVL formula used for ?
Printed From: Crystal Reports Book — Forum Name: Technical Questions
Posted By: sanur13 — 7 Mar 2017 at 10:48pm
Hi everyone,
I'm working on a report that was created by someone else and it has a formula that uses the NVL() fuction. What does that function do exactly?
It goes like this:
nvl(table.field,0)
Thanks a lot,
Santiago
Posted By: DBlank — 8 Mar 2017 at 2:49am
Not familiar with this as a crystal function but I believe it is similar to a coalesce() or isnull() in SQL and it will, in your example, return a 0 when the table.field is null otherwise it returns the value from table.field.
Posted By: sanur13 — 8 Mar 2017 at 4:23am
Thanks a lot, it's exactly what the formula's doing.
Posted By: lockwelle — 24 Mar 2017 at 6:56am
yes, NVL is Oracle IsNull.
COALESCE is ANSI standard and works in both Oracle and SQL
|