Solved

ASP > MSSQL > IsNull() ?

Posted on 2006-06-14
3
1,229 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Microsoft SQL ADO Conn Issue 6 64
Designing forms 3 70
Clear input text 15 34
Display if field is NOT "" or NOT null 6 37
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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 informatio…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

751 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