CASE with more than one result

  • Hello,

    I have a business rule that says if PROD = ''XCDD' and ProductRollUp = 'XCSH' Then BillingType = 'Express Cash' or 'Payment Services'.

    Is there a way to represent that rule with a CASE statement?

    Thank you for your help!

    CSDunn

  • Your question isn't clear to me.

    Is Billing type supposed to result in 'Express Cash' or 'Payment Services'?

    I mean you can

    SELECT

    CASE WHEN PROD = 'XCDD' AND ProductRollUp = 'XCSH' THEN

    'Express Cash'

    ELSE

    'Something Else'

    END

    But not the OR part?

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • You'd need to have some sort of payment category datum. Then "Express Cash" and "Payment Services" could be part of the same category, and the case statement could refer to the category.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Thanks for the responses. I'm going to have to take another look at it.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply