• ssmith 29602 (5/10/2013)


    This is probably very simple but I can't get it to work.

    If trying to write this

    Case Oppo_stage When 'Bus_Written' Then (oppo_closed is null or Oppo_Closed >= GETDATE() -7)

    but I'm being told there is incorrect syntax near the keyword 'is'

    Can anyone help?

    many thanks.

    Total Stab in the dark 😉

    CASE WHEN Oppo_stage = 'Bus_Written' AND (oppo_closed IS NULL OR Oppo_Closed > = GETDATE() -7) THEN Do Something END

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe