Hey DBAs! I am hoping you guys could help me with a problem I have. I have an Oracle login form with just two text boxes (username & password) and a login button with PL/SQL code behind it. Three kinds of users will have access to the login screen - administrators, students, and interpreters. I have been able to successfully make ONLY STUDENTS login fine using this:
But what of interpreters and administrators? They are all in separate tables (i.e. administrator table and interpreter table). How should I approach this? Should I use multiple cursors? If so, what is the appropriate order? Or is there a way I can have the SELECT statement include THREE tables?
Any help here would be appreciated!
Code:
DECLARE
CURSOR logon_cursor IS
SELECT s_dce
FROM student
WHERE s_dce = :logon_block.s_dce
AND s_pw = :logon_block.s_pw;
student_row logon_cursor%ROWTYPE;
BEGIN
OPEN logon_cursor;
FETCH logon_cursor into student_row;
IF logon_cursor%FOUND
THEN GO_ITEM('VIEW_STUDENT.s_dce');
ELSE
MESSAGE('Invalid DCE Username or Password');
:logon_block.s_dce := '';
:logon_block.s_pw := '';
GO_ITEM('logon_block.s_dce');
END IF;
END;
But what of interpreters and administrators? They are all in separate tables (i.e. administrator table and interpreter table). How should I approach this? Should I use multiple cursors? If so, what is the appropriate order? Or is there a way I can have the SELECT statement include THREE tables?
Any help here would be appreciated!
Last edited: