Re: Functions
Date: Fri, 20 Feb 2009 21:03:59 GMT
Message-ID: <3VEnl.606$tw4.345_at_nwrddc01.gnilink.net>
"Mtek" <mtek_at_mtekusa.com> wrote in message
news:c468a5f4-da3f-4027-99db-1f528bbf27d7_at_m40g2000yqh.googlegroups.com...
>
> This is interesting. Say I have a package with a function in it. The
> function is local to that package only and is not called from the
> outside.
>
> Now, I have a line like this:
>
> v_select := 'SELECT col1, col2, GET_PRICE(col3) FROM products';
> open p_output for v_select;
>
> That fails. But, if I create the function by itself, as a normal
> function, then it works fine. Why is this?
>
>
>
Because the function is private the the package. You would see that if you
didn't quote the cursor. If the function is public in the package then you
can do
cursor foo is SELECT col1, col2, my_package.GET_PRICE(col3) get_price FROM
products;
...
Jim
Received on Fri Feb 20 2009 - 15:03:59 CST