Hi, i have the following sp in which i am passing in two values (i_username, i_password) and want i_role_id to come out. The problem i'm having is that i cant get the role id into i_role_id. The error msg i'm getting is :-
PL/SQL: SQL Statement ignored
PL/SQL: ORA-00933: SQL command not properly ended
which occurs on the line 'into i_role_id'
can anyone see what i'm doing wrong?
many thanks,
Alex
PL/SQL: SQL Statement ignored
PL/SQL: ORA-00933: SQL command not properly ended
which occurs on the line 'into i_role_id'
Code:
CREATE OR REPLACE PROCEDURE sp_login
(
i_user_name IN tbl_user.user_name%TYPE,
i_password IN tbl_user.password%TYPE,
i_role_id OUT tbl_roles.role_id%TYPE
)
IS
cnumber number;
cursor c1 is
select user_id
from tbl_user
where user_name = i_user_name;
BEGIN
open c1;
fetch c1 into cnumber;
select role_id from tbl_user_access
'error occurs here
into i_role_id
where cnumber = user_id;
close c1;
END;
/
show errors
/
can anyone see what i'm doing wrong?
many thanks,
Alex