Link to home
Start Free TrialLog in
Avatar of gleznov
gleznov

asked on

Oracle NVL equivalent? Need to change nulls to a string at the Select line.

Hi,

    I'm looking for a SQL Server equivalent to the NVL oracle pl/SQL statement.  What it does is changes a value to another only if that value is null.  So if it's pulling 3 columns from a database, and the third column has the NVL on it, say with the second parameter "Empty" then any rows that have a null value in that column will return "Empty" for that column rather than a null.  Any ideas?

JP
ASKER CERTIFIED SOLUTION
Avatar of rafrancisco
rafrancisco

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rafrancisco
rafrancisco

As an example:

SELECT Column1, ISNULL(Column3, Column2)
FROM YourTable
Avatar of gleznov

ASKER

Thanks!!

JP