3974: ame_attributes.attribute_id in
3975: (select ame_attributes2.attribute_id
3976: from
3977: ame_attributes ame_attributes2,
3978: ame_mandatory_attributes
3979: where
3980: ame_attributes2.attribute_id = ame_mandatory_attributes.attribute_id and
3981: ame_mandatory_attributes.action_type_id = -1 and
3982: engEffectiveRuleDate between
3976: from
3977: ame_attributes ame_attributes2,
3978: ame_mandatory_attributes
3979: where
3980: ame_attributes2.attribute_id = ame_mandatory_attributes.attribute_id and
3981: ame_mandatory_attributes.action_type_id = -1 and
3982: engEffectiveRuleDate between
3983: ame_attributes2.start_date and
3984: nvl(ame_attributes2.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3977: ame_attributes ame_attributes2,
3978: ame_mandatory_attributes
3979: where
3980: ame_attributes2.attribute_id = ame_mandatory_attributes.attribute_id and
3981: ame_mandatory_attributes.action_type_id = -1 and
3982: engEffectiveRuleDate between
3983: ame_attributes2.start_date and
3984: nvl(ame_attributes2.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3985: engEffectiveRuleDate between
3982: engEffectiveRuleDate between
3983: ame_attributes2.start_date and
3984: nvl(ame_attributes2.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3985: engEffectiveRuleDate between
3986: ame_mandatory_attributes.start_date and
3987: nvl(ame_mandatory_attributes.end_date - ame_util.oneSecond, engEffectiveRuleDate))) and
3988: engEffectiveRuleDate between
3989: ame_attributes.start_date and
3990: nvl(ame_attributes.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3983: ame_attributes2.start_date and
3984: nvl(ame_attributes2.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3985: engEffectiveRuleDate between
3986: ame_mandatory_attributes.start_date and
3987: nvl(ame_mandatory_attributes.end_date - ame_util.oneSecond, engEffectiveRuleDate))) and
3988: engEffectiveRuleDate between
3989: ame_attributes.start_date and
3990: nvl(ame_attributes.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3991: engEffectiveRuleDate between
4398: ame_attributes.attribute_id not in
4399: (select ame_attributes2.attribute_id
4400: from
4401: ame_attributes ame_attributes2,
4402: ame_mandatory_attributes
4403: where
4404: ame_attributes2.attribute_id = ame_mandatory_attributes.attribute_id and
4405: ame_mandatory_attributes.action_type_id = -1 and
4406: sysdate between
4400: from
4401: ame_attributes ame_attributes2,
4402: ame_mandatory_attributes
4403: where
4404: ame_attributes2.attribute_id = ame_mandatory_attributes.attribute_id and
4405: ame_mandatory_attributes.action_type_id = -1 and
4406: sysdate between
4407: ame_attributes2.start_date and
4408: nvl(ame_attributes2.end_date - ame_util.oneSecond, sysdate) and
4401: ame_attributes ame_attributes2,
4402: ame_mandatory_attributes
4403: where
4404: ame_attributes2.attribute_id = ame_mandatory_attributes.attribute_id and
4405: ame_mandatory_attributes.action_type_id = -1 and
4406: sysdate between
4407: ame_attributes2.start_date and
4408: nvl(ame_attributes2.end_date - ame_util.oneSecond, sysdate) and
4409: sysdate between
4406: sysdate between
4407: ame_attributes2.start_date and
4408: nvl(ame_attributes2.end_date - ame_util.oneSecond, sysdate) and
4409: sysdate between
4410: ame_mandatory_attributes.start_date and
4411: nvl(ame_mandatory_attributes.end_date - ame_util.oneSecond, sysdate))) and
4412: sysdate between
4413: ame_attributes.start_date and
4414: nvl(ame_attributes.end_date - ame_util.oneSecond, sysdate) and
4407: ame_attributes2.start_date and
4408: nvl(ame_attributes2.end_date - ame_util.oneSecond, sysdate) and
4409: sysdate between
4410: ame_mandatory_attributes.start_date and
4411: nvl(ame_mandatory_attributes.end_date - ame_util.oneSecond, sysdate))) and
4412: sysdate between
4413: ame_attributes.start_date and
4414: nvl(ame_attributes.end_date - ame_util.oneSecond, sysdate) and
4415: sysdate between
4440: and ((engEffectiveRuleDate between ame_condition_usages.start_date
4441: and nvl(ame_condition_usages.end_date - (1/86400), engEffectiveRuleDate)))
4442: union
4443: select 1
4444: from ame_mandatory_attributes,
4445: ame_actions,
4446: ame_action_usages,
4447: ame_rules,
4448: ame_rule_usages
4445: ame_actions,
4446: ame_action_usages,
4447: ame_rules,
4448: ame_rule_usages
4449: where ame_mandatory_attributes.attribute_id = ame_attributes.attribute_id
4450: and ame_mandatory_attributes.action_type_id =
4451: ame_actions.action_type_id
4452: and ame_actions.action_id = ame_action_usages.action_id
4453: and ame_action_usages.rule_id = ame_rules.rule_id
4446: ame_action_usages,
4447: ame_rules,
4448: ame_rule_usages
4449: where ame_mandatory_attributes.attribute_id = ame_attributes.attribute_id
4450: and ame_mandatory_attributes.action_type_id =
4451: ame_actions.action_type_id
4452: and ame_actions.action_id = ame_action_usages.action_id
4453: and ame_action_usages.rule_id = ame_rules.rule_id
4454: and ame_rules.rule_id = ame_rule_usages.rule_id
4456: and ((engEffectiveRuleDate between ame_rules.start_date
4457: and nvl(ame_rules.end_date - (1/86400), engEffectiveRuleDate)))
4458: and ((engEffectiveRuleDate between ame_rule_usages.start_date
4459: and nvl(ame_rule_usages.end_date - (1/86400), engEffectiveRuleDate)))
4460: and engEffectiveRuleDate between ame_mandatory_attributes.start_date
4461: and nvl(ame_mandatory_attributes.end_date - (1/86400), engEffectiveRuleDate)
4462: and engEffectiveRuleDate between ame_actions.start_date
4463: and nvl(ame_actions.end_date - (1/86400), engEffectiveRuleDate)
4464: and ((engEffectiveRuleDate between ame_action_usages.start_date
4457: and nvl(ame_rules.end_date - (1/86400), engEffectiveRuleDate)))
4458: and ((engEffectiveRuleDate between ame_rule_usages.start_date
4459: and nvl(ame_rule_usages.end_date - (1/86400), engEffectiveRuleDate)))
4460: and engEffectiveRuleDate between ame_mandatory_attributes.start_date
4461: and nvl(ame_mandatory_attributes.end_date - (1/86400), engEffectiveRuleDate)
4462: and engEffectiveRuleDate between ame_actions.start_date
4463: and nvl(ame_actions.end_date - (1/86400), engEffectiveRuleDate)
4464: and ((engEffectiveRuleDate between ame_action_usages.start_date
4465: and nvl(ame_action_usages.end_date - (1/86400), engEffectiveRuleDate)))