Solved

ASP > MSSQL > IsNull() ?

Posted on 2006-06-14
3
1,218 Views
Last Modified: 2008-02-26
Hi,

I a used to using ASP to connect to an Access db, but am having to upgrade to MSSQL due to the capacity of the data.  In chaning the ASP scripts I am finding bits and pieces of lines that are not compatible with MSSQL.  The one big one is anything in a Query that says isNull().  

What is the equivilant of isNull for MSSQL?  Instead of saying WHERE isNULL(custID) should I just say WHERE custID='' ?  Does it mean the same thing or am I missing a function that I need to be using here?
0
Comment
Question by:JuniorBee
  • 2
3 Comments
 
LVL 22

Accepted Solution

by:
WMIF earned 500 total points
ID: 16905651
>>Instead of saying WHERE isNULL(custID) should I just say WHERE custID='' ?

you would need to say:

WHERE custID is null
0
 

Author Comment

by:JuniorBee
ID: 16905694
oohhhh!  Thanks!
Mystery solved. =)
0
 
LVL 22

Expert Comment

by:WMIF
ID: 16906109
just for some background that i forgot to put before, the isnull() function requires 2 parameters.  if the value is null, then the function returns the other parameter that you are passing.

var = 5
isnull(var,3)    -> would give 5

var = null
isnull(var,3)    -> would give 3


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_ia-iz_6mek.asp
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question