Subject stored procedure returns no rows
Author john14v6
Hi,

Could someone tell me why this simple stored procedure
is returning no rows, even though I know for sure it
should return rows for the id I pass in?

SET TERM !! ;
CREATE PROCEDURE SP_GET_USER (v_user_id INTEGER)
RETURNS (r_id INTEGER, r_first_name VARCHAR(20),
r_mi CHAR(1), r_last_name VARCHAR(30))
AS
BEGIN
SELECT id, first_name, mi, last_name FROM USERS
WHERE id = :v_user_id
INTO :r_id, r_first_name, r_mi, r_last_name;
EXIT;
END !!
SET TERM ; !!

When I try "SELECT * FROM SP_GET_USER(1)", I get no
rows back, but if I type in "SELECT * FROM USERS WHERE
id = 1", I get a row back.

Please explain.

Thanks,

Ashish