select qcatv.char_name "Characteristic",
ml.meaning "Enabled",
qcatv.TRIGGER_SEQUENCE "Sequence",
qcatv.char_name Chard,
qcatv.operator "Operator_Num",
lower(qcatv.operator_meaning) "Operator",
NVL(qcatv.low_value_meaning, decode(qc.datatype,
2, to_char(qltdate.canon_to_number(qcatv.low_value_other)),
3, qltdate.any_to_user(qcatv.low_value_other),
6, qltdate.canon_to_user(qcatv.low_value_other),
qcatv.low_value_other)) "Trigger Value",
NVL(qcatv.high_value_meaning, decode(qc.datatype,
2, to_char(qltdate.canon_to_number(qcatv.high_value_other)),
3, qltdate.any_to_user(qcatv.high_value_other),
6, qltdate.canon_to_user(qcatv.high_value_other),
qcatv.high_value_other)) "High Trigger",
qa.description "Desc"
from qa_chars qc,
qa_actions qa,
mfg_lookups ml,
qa_char_actions qca,
qa_char_action_triggers_v qcatv
where qcatv.CHAR_ACTION_TRIGGER_ID = qca.CHAR_ACTION_TRIGGER_ID
and qcatv.char_id = qc.char_id
and qca.action_id = qa.action_id
and ml.lookup_type = 'SYS_YES_NO'
and qc.enabled_flag = ml.lookup_code
&P_char_limiter
&P_Enabled_limiter
--order by qca.char_action_id, qcatv.TRIGGER_SEQUENCE
order by 1,2,3,4 |