oracle8.1.6 select acs_object_id_seq.nextval as ticket_id, (select count(*) from ttl_va_areas where context_id = :package_id) as num_areas from dual