Files
mip/Schema/v_current_enquiry_status.vw
hardya 7311d92835 Seed/enst.ctl - add INVALID status
Documentation/Design/DatabaseItemToFunctionalSpecificationReference.xls - add rule O-M5
Documentation/pldoc - regenerated
Modules/mip_helper_special_cases.pck - make reference to Tripartite rule O-M5 (handled by mip_quotation.pck and mip_tripartite.pck
Schema - removed DATA_ITEM_ROLES_IMPORT, added views of enquiries and quote statuses

git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3354 248e525c-4dfb-0310-94bc-949c084e9493
2008-01-22 17:59:56 +00:00

24 lines
739 B
Plaintext

CREATE OR REPLACE VIEW v_current_enquiry_status AS
SELECT enqu_id
,event_date
,enst_code
FROM (SELECT enqu_id
,event_date
,enst_code
,decode(enst_code
,'INP'
,1
,'SUBMITTED'
,2
,'QUOTED'
,3) AS this_event
,MAX(decode(enst_code
,'INP'
,1
,'SUBMITTED'
,2
,'QUOTED'
,3)) over(PARTITION BY enqu_id) AS max_event
FROM enquiry_events)
WHERE this_event = max_event;