![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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? |
#3
| |||
| |||
|
|
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? |
#4
| |||
| |||
|
|
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? |
#5
| |||
| |||
|
|
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? |
![]() |
| Thread Tools | |
| Display Modes | |
| |