| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: PLSQL function
On Wed, 28 Nov 2001 10:16:02 +0100, "Jon" <jzuazoa_at_nexo.es> wrote:
>Hi,
>
>I like to know if it is posible to create a new function so that I could
>pass to it some numeric variables and on the other hand a string variable
>that contains a formula doing some calculations with the numeric variables I
>have also passed to the function. The contect of the string variable could
>look like this "+ cost - vat + net_change". So the question is if it could
>be posible, using PLSQL, to evalute the content of the variable with the
>formula and give me back the result of apliying the formula to the numeric
>values.
>
>Thanks for you help
>
>
Yes. You can do this using dynamic sql.
Passing the arguments to the procedure and dynamically building a sql
string which returns the value you want.
See dbms_sql package.
hth
Andy
Received on Wed Nov 28 2001 - 06:46:39 CST
![]() |
![]() |