oracle8.1.6 select decode(acs_permission.permission_p(:ticket_id, :user_id, 'write'), 't', 1, 0) as write_p, decode(acs_permission.permission_p(:ticket_id, :user_id, 'admin'), 't', 1, 0) as admin_p from dual select tt.subject, cr.content as description, cr.mime_type, ttracker_option.option_name(:package_id, 'severity', tt.severity) as pretty_severity, ttracker_option.option_name(:package_id, 'priority', tt.priority) as pretty_priority, to_char(tt.creation_date, 'MM/DD/YYYY HH24:MI') as created, tc.name as category, tc.category_id, acs_object.name(tt.creation_user) as submitted_by, wc.state, wc.case_id from ttracker_tickets tt, ttracker_categories tc, wf_cases wc, cr_revisions cr where tt.ticket_id = :ticket_id and tc.category_id = tt.category_id and wc.object_id = :ticket_id and cr.revision_id = content_item.get_live_revision(tt.ticket_id) select acs_object.name(wta.party_id) as name from wf_task_assignments wta where wta.task_id = (select max(wt.task_id) from wf_tasks wt, wf_cases wc where wc.object_id = :ticket_id and wt.case_id = wc.case_id and wt.transition_key = 'resolve')