Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Ora newbi question (whenever someone finds time)

Re: Ora newbi question (whenever someone finds time)

From: Raffaello Galli <galli_at_harry.molgen.mpg.de>
Date: Tue, 9 Jul 2002 10:51:05 +0200
Message-ID: <Pine.OSF.4.31.0207091049300.1006-100000@harry.molgen.mpg.de>


Yes, it's possible.
You could even use a stored procedure, this solution is the best if the formula is complex.

greetings

 Raffaello

On 9 Jul 2002, Tom wrote:

> Hello! An answer to your question
> " !!!!I'm new to the Oracle field !!!!
>
> Hi,
> Is it possible to perform simple Arithmetic Expressions in SQL?
> I imagine something like:
>
> > MagicBallCalculateThis '1 + 2 * (3 + 4)';
> >----------------------------------------------
> > 15
>
> Reason:
> An application I am using is sending a Formula in form of a string of
> characters. In order to evaluate the Formula I would have to parse the
> formula to validate it, break it down into each arithmetic operater
> and convert the numeric strings to numbers.
>
> Wish:
> If I could send the complete string as an SQL string to Oracle and get
> the result returned, I would save myself a lot of work since these
> formulas only contain multiplication, addition and subtraction.
>
> Thanks guys
Received on Tue Jul 09 2002 - 03:51:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US