oracle8.1.6 select e.config_id, d.default_config_id, decode(acs_permission.permission_p(e.config_id, :user_id, 'write'), 't', 1, 'f', 0) as write_p, decode(d.configurable_p, 't', 1, 'f', 0) as configurable_p from portal_datasources d, portal_elements e where e.datasource_id = d.datasource_id and e.element_id = :element_id