select attr_value, parameter_id
from apm_parameter_values
where package_id = :curr_package_id
update apm_parameter_values
set attr_value = :attr_value
where package_id = :new_package_id
and parameter_id = :parameter_id
select v.attr_value as subtopic_application
from apm_parameter_values v, apm_parameters p
where v.parameter_id = p.parameter_id
and v.package_id = :curr_package_id
and p.parameter_name = 'subtopic_application'
select parameter_id
from apm_parameters p
where p.parameter_name = 'application'
and package_key = 'editthispage'
update apm_parameter_values
set attr_value = :subtopic_application
where package_id = :new_package_id
and parameter_id = :parameter_id