git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3504 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
11
Schema/V_CURRENT_DOCUMENT_STATUS.vw
Normal file
11
Schema/V_CURRENT_DOCUMENT_STATUS.vw
Normal file
@@ -0,0 +1,11 @@
|
||||
CREATE OR REPLACE VIEW V_CURRENT_DOCUMENT_STATUS AS
|
||||
SELECT docu_id
|
||||
,event_date
|
||||
,dost_code
|
||||
FROM (SELECT docu_id
|
||||
,event_date
|
||||
,dost_code
|
||||
,id
|
||||
,MAX(id) over(PARTITION BY docu_id) AS max_id
|
||||
FROM document_events)
|
||||
WHERE id = max_id;
|
||||
Reference in New Issue
Block a user