oracle8.1.6
select
e.config_id,
d.default_config_id,
decode(e.config_id, d.default_config_id, 1, 0) as default_config_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
declare
v_config_id portal_element_configs.config_id%TYPE;
begin
v_config_id := portal_element_config.new(config_id => :config_id);
end;