steveisaloser
Programmer
Oracle say that decode performs the calculations before it determines which value it needs to calculate eg:<br><br>select (client_type, 'BAD', get.nasty_interest_rate,<br> 'GOOD', get.nice_interest_rate)<br>into interest_to_pay<br>from dual;<br><br>Meaning the package function get.nasty_interest_rate and get.nice_interest_rate is calculated before it determines what the client_type contains. If you audit calculation accesses in get then you get lots of false hits and big overheads. This example is not the actual code but just illustrates the problem. I know that you would think you could use "if then else" but believe me in the case that I want to use this in, that would not be possible. My current work around is to use dynamic sql which does not impress me much. Anyone got any views on this problem. Is Oracle right, and why should this daft processing be like this?