select keyword_id
from cr_keywords
where heading = :heading and
description = :description
select folder_id
from cr_folders f, cr_items i
where i.name = :name and
f.label = :label and
f.description = :description
select a.package_id
from apm_packages a,
site_nodes s
where package_key = :package_key and
a.package_id = s.object_id
select table_name
from acs_object_types
where object_type = :content_type
select coalesce(aa.column_name, aa.attribute_name) as column_name,
aa.datatype
from acs_attributes aa,
ca_attributes ca,
acs_object_types at
where aa.attribute_id = ca.attribute_id and
(ca.package_id = :package_id or
ca.sitewide_p = 't') and
aa.object_type = :content_type and
at.object_type = :content_type
$storage_stub
$query_string
select supertype
from acs_object_types
where object_type = :content_type
SELECT COUNT(*)
FROM acs_attributes
WHERE object_type = 'ca_ad'
AND attribute_name = :attrib