This discussion is archived
1 Reply Latest reply: Apr 20, 2007 10:02 AM by 3004 RSS

Oracle PL-SQL character variable assignment problem

3004 Newbie
Currently Being Moderated
<p>Here is a distilled version that shows the error:<br>BEGIN-PROGRAM<br><br>BEGIN-SQL<br>BEGIN<br>$SqrStr := 'Hello, world';;<br>#SqrNum := 100;;<br>END;;<br>END-SQL<br><br>DISPLAY '$SqrStr: ' NOLINE<br>DISPLAY $SqrStr<br><br>DISPLAY '#SqrNum: ' NOLINE<br>DISPLAY #SqrNum<br><br>END-PROGRAM</p><p>When run, I get this:<br><br>Hyperion SQR Server - 8.5.0.0.0.566<br>Copyright (c) 1994-2006 Hyperion Solutions Corporation. All RightsReserved.<br><br>$SqrStr:<br>#SqrNum: 100.000000<br><br><br><br><br>Version info<br>SQR: Hyperion SQR Server - 8.5.0.0.0.566<br>SQL*Plus SQL*Plus: Release 9.2.0.7.0 - Production on Fri Jan 515:13:18 2007<br>Oracle: Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bitProduction<br>With the Partitioning, OLAP and Oracle Data Mining options<br>JServer Release 9.2.0.7.0 - Production<br><br><br></p><p><br></p>
  • 1. Oracle PL-SQL character variable assignment problem
    3004 Newbie
    Currently Being Moderated
    <p>I appear to be running into the same problem, with the sameversion of SQR. Not only does it fail to assign values to newcharacter variables in a PLSQL block, but itactually wipes out the values of existing variables which arereferenced in the PLSQL block:</p><p> </p><p>BEGIN-PROGRAM<br><br>LET $quote = chr(39)<br>DISPLAY 'Single Quote Character - before plsql: ' NOLINE<br>DISPLAY $quote<br><br>BEGIN-SQL<br>BEGIN<br>$mystr := $quote || 'Hello World' || $quote;;<br>END;;<br>END-SQL<br><br>DISPLAY 'Single Quote - after plsql: ' NOLINE<br>DISPLAY $quote<br>DISPLAY 'mystr: ' NOLINE<br>DISPLAY $mystr<br><br>END-PROGRAM<br></p><p> </p><p>Here is the output on SQR 8.5:</p><p> </p><p>Hyperion SQR Server - 8.5.0.0.0.566<br>Copyright (c) 1994-2006 Hyperion Solutions Corporation. All RightsReserved.<br><br>Single Quote Character - before plsql: '<br>Single Quote - after plsql:<br>mystr:<br><br>SQR: End of Run.<br></p><p>And here is the output on SQR 8.1:</p><p> </p><p>SQR 8.1<br>Copyright (C) Brio Software 1994-2003. All Worldwide RightsReserved.<br><br>Single Quote Character - before plsql: '<br>Single Quote - after plsql: '<br>mystr: 'Hello World'<br><br>SQR: End of Run.</p><p> </p><p><br></p>