oracle8.1.6
select dotlrn_member_rels_approved.rel_id,
dotlrn_member_rels_approved.rel_type,
dotlrn_member_rels_approved.role,
dotlrn_member_rels_approved.user_id,
registered_users.first_names,
registered_users.last_name,
registered_users.email
from registered_users,
dotlrn_member_rels_approved
where dotlrn_member_rels_approved.community_id = :community_id
and dotlrn_member_rels_approved.user_id =
registered_users.user_id order by decode(role,
'instructor',1,
'admin',2,
'teaching_assistant',3,
'course_assistant',4,
'course_admin',5,
'student',6,
'member',7), $order_by