postgresql7.4
SELECT *
FROM cc_uos u, cc_uos_revisions r, cr_items i
WHERE u.uos_id = :uos_id
AND i.item_id = u.uos_id
AND r.uos_revision_id = i.latest_revision
SELECT staff_id FROM cc_staff
SELECT staff_id FROM cc_staff
SELECT DISTINCT coordinator_id FROM cc_stream
WHERE package_id = :package_id
SELECT cc_uos_revision__new (
null,
:uos_id,
:uos_code,
:uos_name,
:credit_value,
:semester,
:online_course_content,
:unit_coordinator_id,
:contact_hours,
:assessments,
:core_uos_for,
:recommended_uos_for,
:prerequisites,
:objectives,
:outcomes,
:activity_log,
:activity_log_format,
now(),
:creation_user,
:creation_ip
);
SELECT latest_revision FROM cr_items WHERE item_id = :object_id
UPDATE cc_uos SET live_revision_id = :latest_revision
WHERE uos_id = :object_id
(select * from cc_users u, cc_staff s where u.user_id = s.staff_id)
(select * from cc_users u, cc_staff s where u.user_id = s.staff_id)