Solved

ASP > MSSQL > IsNull() ?

Posted on 2006-06-14
3
1,213 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video discusses moving either the default database or any database to a new volume.

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now