Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: "Sub Routine" Functionality Within Oracle
pmmgpgp_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 Received on Thu Nov 02 2006 - 08:57:17 CST
![]() |
![]() |