sql - Missing keyword from SELECT CASE -
i unsure wrong sequence of case statements. have looked online , syntax seems correct getting error missing keyword. appreciated!
case when = '1' when sequence_number = 5 9 when sequence_number = 6 9 end when = '2' when sequence_number = 5 9 when sequence_number = 6 9 end when = '3' when sequence_number =7 9 when sequence_number =8 9 end else t.number end number
the simplest option seem be:
case when (a in (1,2) , sequence_number in (5,6)) or (a in (3 ) , sequence_number in (7,8)) 9 else t.number end
Comments
Post a Comment