Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003

    Question Unanswered: Iif Statement Prob

    Well hello therE!

    I came across some difficulities in my sql statements. I'm checking for concurrency in my application. I can get everything to check except I'm having trouble with the date data member.

    AND (signDate = IIf(''='',NULL,#10/24/2003#))

    What I wanna do is check to see if the original signdate that was loaded is still there before i update the record (thereby checking for concurrency).
    Thing is, this sign off date is null OR a date (the work order has to be signed off for there to be a sign date).

    Now, how do i check to see if the original (before the update) is null? Because if the signdate is not null, then this works fine....but i just can't seem to figure out how to check it if its null. The way it is right now, if the signdate is null, that concurrency check won't go and i can't update.

    Hope this makes sense. If you need more info, just let me know. Thx in advance.

  2. #2
    Join Date
    Oct 2003
    Im not sure about my ans. but i am sure NOTHING = Null

    Try isNull

    AND (signDate = IIf(isNULL,trueVal, falseVal))

    not sure if my true and false are in the right order, but definately sure nothing will ever = null


  3. #3
    Join Date
    Dec 2002
    Préverenges, Switzerland
    not clear exactly what you are trying to achieve.

    will return X if signDate is null, otherwise Y

    where does this AND live? in SQL? or?

    what do you want to occur if isnull(signDate) ...and otherwise?

    currently using SS 2008R2

Posting Permissions

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