Description: Create a PSP called Student_List.psp. If more than one record matches your user's search criteria, she should be brought to a page painted by Student_List.
1. Display the search results as a tabled list of students with each name displayed as a hyperlink to the Add/Edit Student screen (the PSP for the Add/Edit Student screen is Student_Personal_Info.)
2. Display the names (concatenated last_name, first_name) and sort this list alphabetically by last_name, first_name.
<%@ page language="PL/SQL" %>
<%@ plsql procedure="student_list" %>
<%@ plsql parameter="p_first_name" %>
<%@ plsql parameter="p_last_name" %>
<%
--------------------------------------------------------
-- FILENAME: student_list.psp
-- FILEDATE: 02.02.2002
-- CREATED BY: Melanie Caffrey
-- DESCRIPTION: Student List
-- URL : http://local_host/pls/any/student_list
--------------------------------------------------------
%>
<%! CURSOR get_student IS
SELECT student_id, first_name, last_name
FROM student
WHERE NVL(UPPER(first_name), 'QQ') LIKE
NVL(UPPER('%'||p_first_name||'%'), 'QQ')
AND UPPER(last_name) LIKE
NVL(UPPER('%'||p_last_name||'%'), UPPER(last_name))
ORDER BY last_name, first_name;
%>
<HTML>
<HEAD>
<TITLE>Student List</TITLE>
</HEAD>
<BODY BGCOLOR="#99CCCC">
<CENTER>
<H2>List of Students</H2>
<TABLE BORDER="3" BORDERCOLOR="midnight blue" CELLPADDING="5">
<TR>
<TH ALIGN=center>Student Names</TH>
</TR>
<% FOR rec IN get_student
LOOP
%>
<TR>
<TD>
<A HREF="student_personal_info?p_student_id=<%= rec.student_id %>">
<FONT FACE="Arial">
<%= rec.last_name||', '||rec.first_name %>
</FONT></A>
</TD>
</TR>
<% END LOOP; %>
</TABLE>
</CENTER>
</BODY>
</HTML>