Re: literal math

  • From: "Rumpi Gravenstein" <rgravens@xxxxxxxxx>
  • To: jeff.eberhard@xxxxxxxxx
  • Date: Thu, 26 Jul 2007 12:29:47 -0400

Yes -- if you do dynamic SQL as in

declare
 -- Local variables here
 str varchar2(10) := '1*8*1';
 rslt NUMBER;
begin
 -- Test statements here
 execute immediate 'SELECT '||str||' FROM DUAL' INTO rslt;
 dbms_output.put_line('The result '||TO_CHAR(rslt)  );
end;
/



On 7/26/07, Jeff Eberhard <jeff.eberhard@xxxxxxxxx> wrote:

Is there a way you know of to take a literal like *1*8*1 and turn it
into the result of 1 times 8 times 1 (8)?  I'm trying to do this in a
connect by prior sql inside a stored procedure.

I'm using the following to get the literal:
sys_connect_by_path((Qty_Per),'*')

Just curious if there is some easy way to do this, otherwise I will
most likely write a function to do this.
--
//www.freelists.org/webpage/oracle-l





--
Rumpi Gravenstein

Other related posts: