![]() | |
#1
| |||
| |||
|
#2
| ||||
| ||||
|
|
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. |
|
But how can you do this in a procedure? * |
|
Since the parameter declaration comes first? |
|
*Do you create a public type? *I'm not sure how to do that...... |
#3
| |||
| |||
|
|
Comments embedded. On Mar 27, 9:58*am, "ame... (AT) iwc (DOT) net" <ame... (AT) iwc (DOT) 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 |
#4
| |||
| |||
|
|
Comments embedded. On Mar 27, 9:58*am, "ame... (AT) iwc (DOT) net" <ame... (AT) iwc (DOT) 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 |
#5
| |||
| |||
|
#6
| |||
| |||
|
|
On Mar 27, 1:50*pm, ddf <orat... (AT) msn (DOT) com> wrote: Comments embedded. On Mar 27, 9:58*am, "ame... (AT) iwc (DOT) net" <ame... (AT) iwc (DOT) 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 The other thing I was looking to do is to create some public REF CURSOR type, and sort of include it anywhere I need it...... But if it must be a package, then it must....- Hide quoted text - - Show quoted text - |
#7
| |||
| |||
|
|
On Mar 27, 4:41*pm, John Schaeffer <ame... (AT) iwc (DOT) net> wrote: On Mar 27, 1:50*pm, ddf <orat... (AT) msn (DOT) com> wrote: Comments embedded. On Mar 27, 9:58*am, "ame... (AT) iwc (DOT) net" <ame... (AT) iwc (DOT) 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 The other thing I was looking to do is to create some public REF CURSOR type, and sort of include it anywhere I need it...... But if it must be a package, then it must....- Hide quoted text - - Show quoted text - You can use a ref_cursor in a procedure without defining it first in a package by using the Oracle provided pre-defined SYS_REFCURSOR definition as in "FUNCTION f(p1 IN SYS_REFCURSOR) RETURN ... ; " The quoted example is from the 9.2 PL/SQL manual section on SYS_REFCURSOR. *See the manual for more information. HTH -- Mark D Powell --- Hide quoted text - - Show quoted text - |
![]() |
| Thread Tools | |
| Display Modes | |
| |