Starting with the Panorama beta, ENDIF and END IF can be used interchangeably, as can END CASE versus END, in expressions and statements.
Can I have a "Woohoo!" please?
SELECT IF dummy_col = 0
THEN 'zero'
ELSE 'not zero'
END IF AS a,
IF dummy_col = 0
THEN 'zero'
ELSE 'not zero'
ENDIF AS b,
CASE dummy_col
WHEN 0 THEN 'zero'
ELSE 'not zero'
END CASE AS c,
CASE dummy_col
WHEN 0 THEN 'zero'
ELSE 'not zero'
END AS d;
IF 0 = 0 THEN
MESSAGE 'zero';
ELSE
MESSAGE 'not zero';
END IF;
IF 0 = 0 THEN
MESSAGE 'zero';
ELSE
MESSAGE 'not zero';
ENDIF;
CASE
WHEN 0 = 0 THEN
MESSAGE 'zero';
ELSE
MESSAGE 'not zero';
END CASE;
CASE
WHEN 0 = 0 THEN
MESSAGE 'zero';
ELSE
MESSAGE 'not zero';
END;
1 comment:
I agree, Breck, but just a little woohoo ...
on the right way (at least ...) but
why not a complete symmetrical and generalized syntax ?
if IF ... END then CASE ... END
if IF ... END IF then CASE ... END CASE
if IF ... ENDIF then CASE ... ENDCASE
Chris
Post a Comment