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

Home -> Community -> Usenet -> c.d.o.misc -> Re: equal names of: parameter of procedure - columns of table

Re: equal names of: parameter of procedure - columns of table

From: <andrewst_at_onetel.com>
Date: 23 May 2005 07:07:17 -0700
Message-ID: <1116857237.794139.322220@g14g2000cwa.googlegroups.com>


Sybrand Bakker wrote:
> >I would be lucky if I don't need to rename my variable names and
there
> >is another way to get what I want.
>
> There is not. Obviously, the error starts with assuming there is.

Except that there is. Here's a working example:

SQL> create or replace function get_name (empno in number)   2 return varchar2
  3 is
  4 ename emp.ename%type;
  5 begin
  6 select emp.ename into get_name.ename   7 from emp
  8 where emp.empno = get_name.empno;   9 return get_name.ename;
 10 end;
 11 /

Function created.

SQL> select get_name(7900) from dual;

GET_NAME(7900)



JAMES **NOT** that I am advocating doing this if it is avoidable. The scope for error is much greater than if a different naming convention is used for parameters. Received on Mon May 23 2005 - 09:07:17 CDT

Original text of this message

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