| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Funciton & VARCHAR2 problem
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;
![]() |
![]() |