View lawprod.MSCM.OPERATOR_ACTIVITY_PAR Generated by
SchemaSpy
Legend:
Primary key columns
Columns with indexes
Implied relationships
Excluded column relationships
< n > number of related tables
 
Column Type Size Nulls Auto Default Children Parents Comments
FIRST_SCAN date 7  √  null
LAST_SCAN date 7  √  null
COMPANY_NO number 4
COMPANY.COMPANY_NO Implied Constraint R
PAR_LOCATION_ID varchar2 5
PAR_LOCATION_DESCRIPTION varchar2 50
LINE_ITEMS_PROCESSED number 22  √  null
LINE_ITEMS_COUNTED number 22  √  null
LINE_ITEMS_ADD_QTY number 22  √  null
TOTAL_QTY_REQUESTED number 22  √  null
USER_ID number 22
USERS.USER_ID Implied Constraint R

Analyzed at Wed May 18 12:10 CDT 2011

View Definition:
SELECT (SELECT MIN(EVENT_TIMESTAMP) FROM EVENT_DETAIL WHERE EVENT_HEADER_ID=EH.EVENT_HEADER_ID) FIRST_SCAN, (SELECT MAX(EVENT_TIMESTAMP) FROM EVENT_DETAIL WHERE EVENT_HEADER_ID=EH.EVENT_HEADER_ID) LAST_SCAN, C.COMPANY_NO COMPANY_NO, LOCATION_CODE PAR_LOCATION_ID, L.NAME PAR_LOCATION_DESCRIPTION, (SELECT COUNT(1) FROM EVENT_DETAIL WHERE EVENT_HEADER_ID=EH.EVENT_HEADER_ID) LINE_ITEMS_PROCESSED, (SELECT COUNT(1) FROM EVENT_DETAIL WHERE EVENT_HEADER_ID=EH.EVENT_HEADER_ID AND QUANTITY IS NOT NULL AND QUANTITY>=0) LINE_ITEMS_COUNTED, (SELECT COUNT(1) FROM EVENT_DETAIL WHERE EVENT_HEADER_ID IN (SELECT DISTINCT EVENT_HEADER_ID FROM EVENT_HEADER WHERE EVENT_TYPE = 'ADQ' AND EVENT_HEADER_GN_03=EH.EVENT_HEADER_ID)) LINE_ITEMS_ADD_QTY, (SELECT SUM(LOCATION_ITEM.PAR_LEVEL - EVENT_DETAIL.QUANTITY + DECODE(EVENT_DETAIL.EVENT_DETAIL_GN_02,-1,0,EVENT_DETAIL.EVENT_DETAIL_GN_02)) FROM EVENT_HEADER, EVENT_DETAIL, LOCATION_ITEM WHERE EVENT_HEADER.EVENT_HEADER_ID =EVENT_DETAIL.EVENT_HEADER_ID AND LOCATION_ITEM.LOCATION_ID =EVENT_DETAIL.REQUESTING_LOCATION_ID AND LOCATION_ITEM.ITEM_ID =EVENT_DETAIL.ITEM_ID AND EVENT_HEADER.EVENT_HEADER_ID = EH.EVENT_HEADER_ID AND EVENT_HEADER.EVENT_TYPE='PAR') TOTAL_QTY_REQUESTED, USER_ID FROM EVENT_HEADER EH, LOCATION L, COMPANY C WHERE L.LOCATION_ID = EH.EVENT_HEADER_GT_01 AND C.COMPANY_NO = L.COMPANY_NO AND EVENT_TYPE='PAR'
 
Possibly Referenced Tables/Views:


Close relationships: