Dynamic SQL

From: The Magnet <art_at_unsu.com>
Date: Fri, 22 Oct 2010 07:25:59 -0700 (PDT)
Message-ID: <c7ec93e0-830a-45a1-8569-22b09cb4afe9_at_e14g2000yqe.googlegroups.com>


Hi, I'm looking for an answer but also thought I can take a shortcut here.

We have a query with a ton of calculations using DECODE and NULLIF and more and more. So, we created a function in which we will pass a pair of values in a string (number,'operator'):

CALC_FORMULA(x,'-',y,'+',z,'*')

My question is, with all that dynamic stuff, can I perform the calculation? I mean, the operators are variables. So, is it as simple as constructing a string and using like EXECUTE IMMEDIATE? Received on Fri Oct 22 2010 - 09:25:59 CDT

Original text of this message