Hey all,
I've got a simple stored procedure I'm calling - and the SQL returns the right
results, but no
matter what I seem to do it returns '0'.
Basically it recalls how many times a user has logged in (which is stored on a table)
nothing
fancy there:
The code is the following:
-- declaration
Procedure getNumberOfLogins(
t_employeeNumber in Varchar2,
t_application in varchar2,
r_count OUT number
);
-- body
Procedure getNumberOfLogins(
t_employeeNumber in Varchar2,
t_application in varchar2,
r_count OUT number
) IS
BEGIN
DECLARE
CURSOR c_logins is
select count(login.idlogin) as loginCount
from login
where
upper(login.employeenumber) = upper(t_employeeNumber)
and
upper(login.application) = upper(t_application);
BEGIN
open c_Logins;
fetch c_Logins into r_count;
close c_Logins;
END;
END getNumberOfLogins;
The weird thing is - the variables are being passed fine, but if change the
't_employeeNumber'
and the 't_application' to hard coded values, the script returns the correct values.
I'm sure I'm missing something small on this - but I just can't see it :oP
TIA
Mark
------------------------------------------------------------------
[EMAIL PROTECTED]
ICQ: 3094740
Safe From Bees
[ www.safefrombees.com ]
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004