select pem.element_id as element_id from portal_element_map pem, portal_pages pp where pp.portal_id= :portal_id and pp.page_id = pem.page_id and pem.datasource_id= :ds_id select value from portal_element_parameters where element_id = :element_id and key = 'content_id' update static_portal_content set content = :content, pretty_name = :pretty_name where content_id = :content_id select pretty_name from static_portal_content where content_id = :content_id select package_id from static_portal_content where content_id = :content_id