
September 14th, 2012, 02:16 PM
|
|
|
|
Inline pragma before cursor
Hi,
I have a stored proc that calls a user-defined function "fun" like this (greatly simplified):
Code:
procedure foo(p_cursor out ref cursor)
begin
open p_cursor for
select a.*
from a
where fun(a.b) = 1
end foo;
I want to call fun with "pragma inline(fun, 'YES')".
According to the Oracle documentation, the inline pragma will affect only the following statements if placed right before them:
Code:
Assignment CASE EXIT-WHEN
Call CONTINUE-WHEN LOOP
Conditional EXECUTE IMMEDIATE RETURN
So, in my case, where should I put the pragma? I do have a call, but it's wrapped in the SQL within a cursor definition.
What is the right way (if this is feasible at all)?
Thanks.
|