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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!!
JP
JP
SELECT Column1, ISNULL(Column3, Column2)
FROM YourTable