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: Funciton & VARCHAR2 problem

Re: Funciton & VARCHAR2 problem

From: Jaap W. van Dijk <j.w.vandijk.removethis_at_hetnet.nl>
Date: Wed, 10 Apr 2002 16:47:38 GMT
Message-ID: <3cb46c8a.814049@news.jaapwvandijk.myweb.nl>


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

Original text of this message

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