65: union
66: select tmp.legislation_code
67: from hr_form_templates_b tmp
68: ,hr_template_items_b tim
69: ,hr_template_item_contexts_b tic
70: ,hr_item_properties_b itp
71: where tmp.form_template_id = tim.form_template_id
72: and tim.template_item_id = tic.template_item_id
73: and tic.template_item_context_id = itp.template_item_context_id
161: AND p_form_item_id is null
162: AND p_template_item_context_id is null
163: UNION
164: SELECT form_id
165: FROM hr_template_item_contexts_b tic
166: , hr_template_items_b hti
167: , hr_form_items_b hfi
168: WHERE tic.template_item_context_id = p_template_item_context_id
169: AND hti.template_item_id = tic.template_item_id
315: cursor csr_template_item_context is
316: select fim.item_type
317: from hr_form_items_b fim
318: ,hr_template_items_b tim
319: ,hr_template_item_contexts_b tic
320: where fim.form_item_id = tim.form_item_id
321: and tim.template_item_id = tic.template_item_id
322: and tic.template_item_context_id = p_template_item_context_id;
323: --