Re: REF CURSOR
From: John Schaeffer <amerar_at_iwc.net>
Date: Fri, 27 Mar 2009 13:36:04 -0700 (PDT)
Message-ID: <e2a14930-ed0f-4eee-bfff-8c93f4fddb28_at_i28g2000prd.googlegroups.com>
On Mar 27, 1:50 pm, ddf <orat..._at_msn.com> wrote:
> Comments embedded.
>
> On Mar 27, 9:58 am, "ame..._at_iwc.net" <ame..._at_iwc.net> wrote:
>
> > Ok, this is probably a dumb question, but, I have this code:
>
> > CREATE OR REPLACE PROCEDURE cj_trials_log (
> > p_newsletter_id NUMBER,
> > p_conversion_date VARCHAR2,
> > p_data OUT REF_CRS) IS
>
> > TYPE ref_crs IS REF CURSOR;
> > .
> > .
> > .
>
> > I think it is upset because I use the REF_CRS before it is defined.
>
> I'm doing my best to be civil ... and, yes, it IS 'upset' because of
> your coding practices.
>
> > But how can you do this in a procedure?
>
> You don't outside of a package.
>
> > Since the parameter
> > declaration comes first?
>
> This is one reason there are packages, as well as procedures. Declare
> this in the package, then use it in the packaged procedire, it's
> fairly simple.
>
> > Do you create a public type? I'm not sure
> > how to do that......
>
> You also can't search the newsgroup for "ref cursor" and see what you
> find? Is it THAT difficult to use a search engine???
>
> http://lmgtfy.com/?q=ref+cursor
>
> David Fitzjarrell
Date: Fri, 27 Mar 2009 13:36:04 -0700 (PDT)
Message-ID: <e2a14930-ed0f-4eee-bfff-8c93f4fddb28_at_i28g2000prd.googlegroups.com>
On Mar 27, 1:50 pm, ddf <orat..._at_msn.com> wrote:
> Comments embedded.
>
> On Mar 27, 9:58 am, "ame..._at_iwc.net" <ame..._at_iwc.net> wrote:
>
> > Ok, this is probably a dumb question, but, I have this code:
>
> > CREATE OR REPLACE PROCEDURE cj_trials_log (
> > p_newsletter_id NUMBER,
> > p_conversion_date VARCHAR2,
> > p_data OUT REF_CRS) IS
>
> > TYPE ref_crs IS REF CURSOR;
> > .
> > .
> > .
>
> > I think it is upset because I use the REF_CRS before it is defined.
>
> I'm doing my best to be civil ... and, yes, it IS 'upset' because of
> your coding practices.
>
> > But how can you do this in a procedure?
>
> You don't outside of a package.
>
> > Since the parameter
> > declaration comes first?
>
> This is one reason there are packages, as well as procedures. Declare
> this in the package, then use it in the packaged procedire, it's
> fairly simple.
>
> > Do you create a public type? I'm not sure
> > how to do that......
>
> You also can't search the newsgroup for "ref cursor" and see what you
> find? Is it THAT difficult to use a search engine???
>
> http://lmgtfy.com/?q=ref+cursor
>
> David Fitzjarrell
Dave,
I did search, but I was looking specifically to declare a REF within a procedure......
Thanks! Received on Fri Mar 27 2009 - 15:36:04 CDT