Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Funciton & VARCHAR2 problem
What's the error?
Jaap.
On Wed, 10 Apr 2002 16:14:29 GMT, miker <mdent12_at_none.com> wrote:
>if i hard code the variable i get the right result but if the
>parameter is passed in as a VARCHAR2 it doesn't work. what is wrong?
>
> FUNCTION dCount (p_code IN VARCHAR2)
> RETURN NUMBER IS
> result NUMBER;
> BEGIN
> select count(*) INTO result from dd a
> where a.code=p_code -- works fine if i say a.code='HR';
> RETURN result;
> END;
Received on Wed Apr 10 2002 - 11:47:38 CDT
![]() |
![]() |