Re: Functions

From: Robert Klemme <>
Date: Sat, 21 Feb 2009 11:05:30 +0100
Message-ID: <>

On 20.02.2009 22:03, gym dot scuba dot kennedy at gmail wrote:
> "Mtek" <> wrote in message 

>> 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.

Here you have provided the explanation yourself.

>> 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;

Mtek, I suggest you read the basic documentation about PL/SQL:


        robert Received on Sat Feb 21 2009 - 04:05:30 CST

Original text of this message