Re: Functions
From: Robert Klemme <shortcutter_at_googlemail.com>
Date: Sat, 21 Feb 2009 11:05:30 +0100
Message-ID: <70a1veFngq7uU1_at_mid.individual.net>
On 20.02.2009 22:03, gym dot scuba dot kennedy at gmail wrote:
>> 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.
Date: Sat, 21 Feb 2009 11:05:30 +0100
Message-ID: <70a1veFngq7uU1_at_mid.individual.net>
On 20.02.2009 22:03, gym dot scuba dot kennedy at gmail wrote:
> "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.
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:
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/toc.htm
Regards
robert Received on Sat Feb 21 2009 - 04:05:30 CST