-- List messages sent to a specific user email address or with a specified string in the subject.
select nntp.parent_key_id "RequestID",
nntr.email_address,
nntr.creation_date,
nntp.notification_sent_flag,
nntp.subject
from KNTA_NOTIF_TXN_RECIPIENTS nntr,
KNTA_NOTIF_TXN_PARENTS nntp,
KNTA_NOTIF_TXN_DETAILS nntd
where nntr.notif_txn_detail_id = nntd.notif_txn_detail_id
and nntd.notif_txn_parent_id = nntp.notif_txn_parent_id
-- Limit to after a specific date
-- and nntr.creation_date >= to_date('06-30-2005 12:00:00 AM', 'mm-dd-yyyy hh:mi:ss AM')
-- Limit to before a specific date
-- and nntr.creation_date <= to_date('06-30-2005 12:59:59 PM', 'mm-dd-yyyy hh:mi:ss AM')
-- Limit to one or more request ID's
-- and nntp.parent_key_id in ( 123456, 123457 )
-- Limit by specifying part of addressee email
-- and nntr.email_address like '%dave%'
-- Limit by specifying distinctive sub-string in the message
and nntp.subject like '%cancelled%'
order by nntr.creation_date desc
|