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

Funciton & VARCHAR2 problem

From: miker <mdent12_at_none.com>
Date: Wed, 10 Apr 2002 16:14:29 GMT
Message-ID: <lqo8bu0ekro6qf2a03kgbmuqfjr2hhktjp@4ax.com>


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:14:29 CDT

Original text of this message

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