109: g_leg_code) = g_leg_code
110: and decode
111: (TAB.user_key_units,
112: 'D', to_char(fnd_date.canonical_to_date(p_row_value)),
113: 'N', to_char(fnd_number.canonical_to_number(p_row_value)),
114: 'T', upper (p_row_value),
115: null) =
116: decode
117: (TAB.user_key_units,
115: null) =
116: decode
117: (TAB.user_key_units,
118: 'D', to_char(fnd_date.canonical_to_date(R.row_low_range_or_name)),
119: 'N', to_char(fnd_number.canonical_to_number(R.row_low_range_or_name)),
120: 'T', upper (R.row_low_range_or_name),
121: null)
122: and CINST.user_row_id = R.user_row_id
123: and l_effective_date between CINST.effective_start_date
206: and nvl (R.business_group_id,
207: p_bus_group_id) = p_bus_group_id
208: and nvl (R.legislation_code,
209: g_leg_code) = g_leg_code
210: and fnd_number.canonical_to_number (p_row_value)
211: between fnd_number.canonical_to_number (R.row_low_range_or_name)
212: and fnd_number.canonical_to_number (R.row_high_range)
213: and TAB.user_key_units = 'N'
214: and CINST.user_row_id = R.user_row_id
207: p_bus_group_id) = p_bus_group_id
208: and nvl (R.legislation_code,
209: g_leg_code) = g_leg_code
210: and fnd_number.canonical_to_number (p_row_value)
211: between fnd_number.canonical_to_number (R.row_low_range_or_name)
212: and fnd_number.canonical_to_number (R.row_high_range)
213: and TAB.user_key_units = 'N'
214: and CINST.user_row_id = R.user_row_id
215: and l_effective_date between CINST.effective_start_date
208: and nvl (R.legislation_code,
209: g_leg_code) = g_leg_code
210: and fnd_number.canonical_to_number (p_row_value)
211: between fnd_number.canonical_to_number (R.row_low_range_or_name)
212: and fnd_number.canonical_to_number (R.row_high_range)
213: and TAB.user_key_units = 'N'
214: and CINST.user_row_id = R.user_row_id
215: and l_effective_date between CINST.effective_start_date
216: and CINST.effective_end_date