sql - Combining different CASE expression syntaxes -
my understanding of case expression can use matching:
case expression when first_option some_value when second_option some_other_value else default_value end and evaluating conditions:
case when a_value = another_value some_result when some_other_condition some_other_result else default_value end but can combine both:
case expression when first_option , a_value = another_value some_result when second_option , some_other_condition some_other_result else default value end for example, work?:
case btt_display when 'col' , bd_trans_date = bd_posted_date 'y' when 'dis' , bd_trans_date = bs_posted_date 'y' else 'n' end sda_ind
you can't combine them. 1 expects value after when, other condition.
case column when value case when condition attempting combine them places condition value expected.
Comments
Post a Comment