locked
Conditional Split Case Statement Problems?????? RRS feed

  • Question

  • How can I use a conditional split to verify many multiple conditions in one Case?  Is it possible to check for multiple conditions in one case or do I need to come up with different cases? Reason being if any of these instances are true I am going to insert the record into a particular .  I don't think it is good to have 13 different inserts for the same table, and 13 different conditions.  For example the address column I have needs to not be null and it needs to have either 'A-Z', 'a-z', and '0-9'.  How can I accomplish this because just checking for nulls creates separate cases.  Why can't I use the || to mean or and just create one long case??????
    Tuesday, February 19, 2013 9:48 PM

Answers

  • Chained Conditional Operators

    «boolean_test» ? «true_result» : «false_result»

    will work, but they must be placed logically correct which may be an issue at times


    Arthur My Blog

    • Proposed as answer by DeviantLogic Tuesday, February 19, 2013 11:51 PM
    • Marked as answer by soldierfc Wednesday, February 20, 2013 2:39 PM
    • Unmarked as answer by soldierfc Wednesday, February 20, 2013 3:37 PM
    • Marked as answer by soldierfc Wednesday, February 20, 2013 4:09 PM
    Tuesday, February 19, 2013 10:00 PM
  • FINDSTRING([Copy of Copy of EMAIL_ADDRESS],"@",1) > 0 already produces true or false

    Arthur My Blog

    • Marked as answer by soldierfc Wednesday, February 20, 2013 4:09 PM
    Wednesday, February 20, 2013 3:47 PM

All replies