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