If and Nulls

Results 1 to 3 of 3

Thread: If and Nulls

  1. #1
    Join Date
    Dec 1969

    Default If and Nulls

    I am using an if stament to compare to variables. I am getting the values form a database table. There are some NULL values in the database. Here is my problem. For some readon I can not compare the 2 values if one is NULL so if a ="green" and b=null<BR>the following stament does not work<BR>if a &#060;&#062; b then<BR> .....<BR> a = b<BR>end if<BR>I guess what I am trying to say is how can I compare null values with strings<BR><BR>

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: If and Nulls

    do this<BR><BR>if isnull(a) then a = ""<BR><BR><BR>and so on.

  3. #3
    New ASP Guest

    Default RE: If and Nulls

    Select case true<BR>case isnull(a) AND isnull(b)<BR>response.wriet "a = b"<BR>case isnull(a) OR isnull(b)<BR>response.wriet "a&#060;&#062;b"<BR>case a = b<BR>response.wriet "a = b"<BR>case else<BR>response.wriet "a &#060;&#062; b"<BR>end select<BR><BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts