Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 NVL Question

Author  Topic 

shifis
Posting Yak Master

157 Posts

Posted - 2006-03-30 : 13:13:11
In Oracle exist a function called NVL that in case that the first parameter is null it return the value of the second parameter.
What is the name of this function in SQL Server 2000?

Example:

SELECT NVL(( SELECT DESCRIPTION FROM ITEMMAST WHERE ITEM_GROUP='SMART' AND ITEM=strITEM),'') X
FROM DUAL;

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-03-30 : 13:17:33
select isnull(col1, '')
from table

Go with the flow & have fun! Else fight the flow
Blog thingie: [URL="http://weblogs.sqlteam.com/mladenp"]
Go to Top of Page

shifis
Posting Yak Master

157 Posts

Posted - 2006-03-30 : 13:18:33
THANKS A LOT!!!
Go to Top of Page

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2006-03-30 : 14:25:52
Actually I prefer coalesce(col1,'')

rockmoose
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-03-30 : 14:47:46
then i'm positive you'll love this, rocko:
http://weblogs.sqlteam.com/mladenp/archive/2006/03/27/9425.aspx


Go with the flow & have fun! Else fight the flow
Blog thingie: [URL="http://weblogs.sqlteam.com/mladenp"]
Go to Top of Page

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2006-03-30 : 15:17:05
Cool, I just installed VS2005 yesterday, and will rush to try that out

rockmoose
Go to Top of Page

jhermiz

3564 Posts

Posted - 2006-03-30 : 15:23:57
You poor soul, you'll rush to try out operator ?? ?


Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]

RS Blog -- [url]http://weblogs.sqlteam.com/jhermiz[/url]
Go to Top of Page

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2006-03-30 : 15:45:57
quote:
Originally posted by jhermiz

You poor soul, you'll rush to try out operator ?? ?


"what's your f***ing problem" ?? "of course"

rockmoose
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-03-30 : 15:53:07
practical use of ?? operator... inventive

Go with the flow & have fun! Else fight the flow
Blog thingie: [URL="http://weblogs.sqlteam.com/mladenp"]
Go to Top of Page

jhermiz

3564 Posts

Posted - 2006-03-30 : 16:58:06
lol


Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]

RS Blog -- [url]http://weblogs.sqlteam.com/jhermiz[/url]
Go to Top of Page
   

- Advertisement -