oracle8.1.6
begin :1 := acs_object.name(:instance_id); end;
select contact_id,
nvl(last_name,'
') as last_name,
nvl(first_names,'
') as first_names,
nvl(title,'
') as title,
nvl(organization,'
') as organization,
nvl(work_phone,'
') as work_phone,
nvl(home_phone,'
') as home_phone,
nvl(fax,'
') as fax,
nvl(other,'
') as other,
nvl(email,'
') as email,
acs_permission.permission_p(acr.rel_id,:user_id,'delete') as delete_p,
acr.rel_id
from ab_contacts_related acr
where acs_permission.permission_p(contact_id,:user_id,'read') = 't'
and object_id = :instance_id
[value_if_exists search_filter]