Print Page | Close Window

What is the NVL formula used for ?

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22261
Printed Date: 27 Apr 2024 at 1:48pm


Topic: What is the NVL formula used for ?
Posted By: sanur13
Subject: What is the NVL formula used for ?
Date Posted: 07 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



Replies:
Posted By: DBlank
Date Posted: 08 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
Date Posted: 08 Mar 2017 at 4:23am
Thanks a lot, it's exactly what the formula's doing.



Posted By: lockwelle
Date Posted: 24 Mar 2017 at 6:56am
yes, NVL is Oracle IsNull.
COALESCE is ANSI standard and works in both Oracle and SQL



Print Page | Close Window