Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ASP > MSSQL > IsNull() ?

Posted on 2006-06-14
3
Medium Priority
?
1,250 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 2000 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

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…
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…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

722 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