Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: "Sub Routine" Functionality Within Oracle

Re: "Sub Routine" Functionality Within Oracle

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 2 Nov 2006 07:12:44 -0800
Message-ID: <1162480364.704049.193880@f16g2000cwb.googlegroups.com>

On Nov 2, 9:57 am, "fitzjarr..._at_cox.net" <fitzjarr..._at_cox.net> wrote:
> pmmg..._at_gmail.com wrote:
> > I have a basic understanding of Functions and Procedures.
>
> > I need to use one or the other as a sub routine ( I need to pass it no
> > value and need nothing returned ). I can do with either Function or a
> > Procedure but Oracle gives me "Hints" such as the following; that I
> > would like either not to happen or need to know how to resolve (have a
> > clean compile). I can use the errors to get to the areas Oracle
> > recognizes as problems but can't determine what I need to do to get
> > Oracle to think I've "used" the variable.
>
> > Thanks
> > Dave
>
> > Error: Hint: Value assigned to 'ret' never used in 'cr_data_retention'
> > Line: 842
> > Text: ret := step07_Apply_min_term('nada');
>
> > Error: Hint: Variable 'Trunk_Them' is declared but never used in
> > 'step00_trunc'
> > Line: 128
> > Text: Trunk_Them varchar2(1) :=
> > pkg_cr_Cust_Retention_data_BSC.Truncate_test_Tables('Y');You haven't used them, so why should Oracle think you have? And why
> are you trying to use a function to process data without returning some
> value? A procedure is what you would need to take no input, provide no
> output yet process data. And I don't understand why you declare
> variables you know you won't use.
>
> Of course all of this means nothing without seeing the actual code
> you've written; why have you not provided this?
>
> David Fitzjarrell- Hide quoted text -- Show quoted text -

I agree with David.

You need to either post at leat part of the code. If you are only trying to ask general questions of the nature, "I can do A or B, when should I choose A over B?" then you need to explain your questions in more detail.

HTH -- Mark D Powell -- Received on Thu Nov 02 2006 - 09:12:44 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US