1: function ad_group_member_p
2: (v_user_id IN user_group_map.user_id%TYPE,
3: v_group_id IN user_group_map.group_id%TYPE)
4: return char
5: IS
6: ad_group_member_p char(1);
7: BEGIN
8: -- maybe we should check the validity of user_id and group_id;
9: -- we're not doing it for now, because it would slow this function
10: -- down with 2 extra queries
11:
12: select decode(count(*), 0, 'f', 't')
13: into ad_group_member_p
14: from user_group_map
15: where user_id = v_user_id
16: and group_id = v_group_id
17: and rownum < 2;
18:
19: return ad_group_member_p;
20: END ad_group_member_p;
|