View Single Post
  #1 (permalink)  
Old November 30th, 2005, 03:38 PM
dwj119 dwj119 is offline
Registered User
 
Join Date: Nov 2005
Location: York Haven, PA, .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Case Statement In Where Clause Logic

I know this is possible, but I can't seem to get the syntax correct. Any help would be much appreciated.


Where bi.EDIID = 5444 AND (
                   (bid.ssn IS NULL and el.PersonId is NOT NULL)
            or
                    (el.personid is NULL and bid.ssn is NOT NULL)
            or
CASE WHEN (bid.SSN IS NOT NULL AND el.personid IS NOT NULL)
    THEN ((el.PremiumDue <> bid.PremiumDue)
       or (el.PremiumDueRound <> bid.PremiumDueRounded))
ELSE (1 = 2)
END


http://www.jtechonline.com"
__________________
&lt;a href=\"http://www.jtechonline.com\"&gt;JTechOnline&lt;/a&gt;
Reply With Quote