SQR 8.5 variables losing their values inside BEGIN-SQL block
627964Mar 11 2008 — edited Apr 3 2008begin-program
let $hi = 'Hi'
let $world = 'WORLD'
show '$hi is ' $hi
show '$world is ' $world
do call_func
end-program
begin-procedure call_func
begin-sql
declare
begin
$hi_world := $hi||' '||$world;;
end;;
end-sql
show '$hi is ' $hi
show '$world is ' $world
show '$hi_world is ' $hi_world
end-procedure
When I run this program in version 8.1 I get
SQR 8.1
Copyright (C) Brio Software 1994-2003. All Worldwide Rights Reserved.
$hi is Hi
$world is WORLD
$hi is Hi
$world is WORLD
$hi_world is Hi WORLD
SQR: End of Run.
This is was I would expect to get. Running this in SQR 8.5 yields very different results.
Hyperion SQR Server - 8.5.0.0.0.566
Copyright (c) 1994-2006 Hyperion Solutions Corporation. All Rights Reserved.
$hi is Hi
$world is WORLD
$hi is
$world is
$hi_world is
SQR: End of Run.
Not only doesn't $hi_world get set properly but $hi and $world get completely wiped out.
Can someone explain what I am seeing? How can I get the new version to behave like the old one?