#!/usr/local/bin/oraperl
|
# Specify the user name/password and a database server
|
$user_name = "cps616"; $passwd = "xyz"; $database = $ENV{'ORACLE_SID'};
|
# Login to the ORACLE SQL.
|
$lda = &ora_login($database, $user_name, $passwd) || die; $ora_errstr;
|
# Cursor for quering phone number by a person's first or last name
|
$phone_cursor =
|
"SELECT last_name, first_name, phone_no, phone_type
|
FROM person_info_table a, phone_list_table b
|
WHERE (last_name LIKE ('%' || LOWER(:1) || '%') OR
-
first_name LIKE ('%' || LOWER(:1) || '%'))
|
AND (a.person_id = b.person_id)";
|