SET a parameter in BEGIN END statement

oneill
New Contributor II

Hello,

How to set a parameter in a begin end statement. for exemple the following query fails : 

begin

SET ansi_mode = true;

end;

with Cannot resolve variable `ANSI_MODE` on search path `SYSTEM`.`SESSION`. SQLSTATE: 42883