SQL to select overdue items set heading off

set pagesize 400

set linesize 200

set feedback off

spool text.lst

select circ_transactions.patron_id || '|' || bib_text.title || '|' from circ_transactions, bib_text, bib_mfhd, mfhd_item

where circ_transactions.item_id = mfhd_item.item_id and

mfhd_item.mfhd_id = bib_mfhd.mfhd_id and

bib_mfhd.bib_id = bib_text.bib_id and

circ_transactions.current_due_date < sysdate and

(circ_transactions.CIRC_POLICY_MATRIX_ID = '776' or

circ_transactions.CIRC_POLICY_MATRIX_ID = '672' or

circ_transactions.CIRC_POLICY_MATRIX_ID = '205' or

circ_transactions.CIRC_POLICY_MATRIX_ID = '204' or

circ_transactions.CIRC_POLICY_MATRIX_ID = '63' or

circ_transactions.CIRC_POLICY_MATRIX_ID = '983' or

circ_transactions.CIRC_POLICY_MATRIX_ID = '774' or

circ_transactions.CIRC_POLICY_MATRIX_ID = '614' or

circ_transactions.CIRC_POLICY_MATRIX_ID = '156' or

circ_transactions.CIRC_POLICY_MATRIX_ID = '984' or

circ_transactions.CIRC_POLICY_MATRIX_ID = '775' or

circ_transactions.CIRC_POLICY_MATRIX_ID = '173' or

circ_transactions.CIRC_POLICY_MATRIX_ID = '172' or

circ_transactions.CIRC_POLICY_MATRIX_ID = '813' or

circ_transactions.CIRC_POLICY_MATRIX_ID = '221' or

circ_transactions.CIRC_POLICY_MATRIX_ID = '220' or

circ_transactions.CIRC_POLICY_MATRIX_ID = '809' or

circ_transactions.CIRC_POLICY_MATRIX_ID = '237' or

circ_transactions.CIRC_POLICY_MATRIX_ID = '236' or

circ_transactions.CIRC_POLICY_MATRIX_ID = '252' or

circ_transactions.CIRC_POLICY_MATRIX_ID = '251' or

circ_transactions.CIRC_POLICY_MATRIX_ID = '268' or

circ_transactions.CIRC_POLICY_MATRIX_ID = '267' or

circ_transactions.CIRC_POLICY_MATRIX_ID = '313' or

circ_transactions.CIRC_POLICY_MATRIX_ID = '312' or

circ_transactions.CIRC_POLICY_MATRIX_ID = '985' or

circ_transactions.CIRC_POLICY_MATRIX_ID = '776' or

circ_transactions.CIRC_POLICY_MATRIX_ID = '329' or

circ_transactions.CIRC_POLICY_MATRIX_ID = '328' or

circ_transactions.CIRC_POLICY_MATRIX_ID = '810');

/

exit