postgresql7.4 select p.instance_name, o.creation_user, o.creation_ip from apm_packages p join acs_objects o on (p.package_id = o.object_id) where p.package_id = :curriculum_id SELECT 1 from cc_curriculum where curriculum_id = :curriculum_id INSERT INTO cc_curriculum (curriculum_id, folder_id, root_keyword_id) VALUES (:curriculum_id, :folder_id, :keyword_id) SELECT cc_curriculum__delete(:curriculum_id) SELECT first_names || ' ' || last_name || ' (' || email || ')' AS name, user_id FROM cc_users SELECT first_names || ' ' || last_name || ' (' || email || ')' AS name, user_id FROM cc_users WHERE user_id NOT IN (SELECT staff_id FROM cc_staff) SELECT s.title || ' ' || u.first_names || ' ' || u.last_name || ' (' || email || ')' AS name, staff_id FROM cc_staff s, cc_users u WHERE s.staff_id = u.user_id SELECT department_name, department_id FROM cc_department WHERE package_id = :package_id SELECT name, name_id FROM cc_uos_tl_name WHERE package_id = :package_id SELECT name, name_id FROM cc_uos_gradattr_name WHERE package_id = :package_id SELECT name FROM cc_session WHERE session_id = :session_id AND package_id = :package_id SELECT gan.name FROM cc_uos_gradattr_name gan, cc_uos_gradattr_map gam, cc_uos_gradattr ga, cc_uos_gradattr_set gas WHERE gas.parent_uos_id = :uos_id AND gas.latest_revision_id = gam.revision_id AND gam.gradattr_id = ga.gradattr_id AND ga.name_id = gan.name_id