134: -- associated with the wrong input values because they rely on the sequence
135: -- remaining unchanged.
136: --
137: -- Bug 2786908 : converted into a union as new version oy paylink
138: -- always populates element_type_id in pay_batch_lines. Hence 2nd
139: -- half of union can be removed at some future stage.
140: --
141: cursor csr_paylink is
142: select 1
139: -- half of union can be removed at some future stage.
140: --
141: cursor csr_paylink is
142: select 1
143: from pay_batch_lines
144: where element_type_id = p_element_type_id
145: and element_type_id is not null
146: union all
147: select 1
144: where element_type_id = p_element_type_id
145: and element_type_id is not null
146: union all
147: select 1
148: from pay_batch_lines
149: where element_type_id is null
150: and upper (element_name) = upper (p_element_name);
151: --
152: begin