select segment_id from rel_segments where segment_name='dotLRN Profiled Users' select segment_id from rel_segments where segment_name='dotLRN Full Profiled Users' select theme_id from dotlrn_full_users where user_id = :user_id update dotlrn_full_user_rels set theme_id= :theme_id where rel_id= (select rel_id from dotlrn_full_users where user_id= :user_id) select portal_id from dotlrn_full_users where user_id= :user_id select node_id from site_nodes where object_id= :package_id select dotlrn_user_types.group_id from dotlrn_user_types where dotlrn_user_types.type = :type