View lawprod.MSCM.OPERATOR_ACTIVITY_POU | Generated by SchemaSpy |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Analyzed at Wed May 18 12:10 CDT 2011 |
View Definition:
SELECT AL.USER_ID, TO_CHAR(AL.START_TIME,'DD-MON-YY HH24:MI:SS') AS START_TIME, TO_CHAR(AL.END_TIME,'DD-MON-YY HH24:MI:SS') AS END_TIME, (SELECT L.COMPANY_NO FROM LOCATION L WHERE AL.SOURCE_LOCATION_ID = L.LOCATION_ID) COMPANY_NO, (SELECT L.LOCATION_CODE FROM LOCATION L WHERE AL.SOURCE_LOCATION_ID = L.LOCATION_ID) LOCATION_CODE, (SELECT L.NAME FROM LOCATION L WHERE AL.SOURCE_LOCATION_ID = L.LOCATION_ID) NAME, (SELECT A.QUANTITY FROM ACTIVITY_LOG A WHERE AL.ACTIVITY_LOG_ID = A.ACTIVITY_LOG_ID AND (A.ACTIVITY_TYPE = 400 OR A.ACTIVITY_TYPE = 402 OR A.ACTIVITY_TYPE = 410 OR A.ACTIVITY_TYPE = 420)) PULL_QTY, (SELECT A.QUANTITY FROM ACTIVITY_LOG A WHERE AL.ACTIVITY_LOG_ID = A.ACTIVITY_LOG_ID AND (A.ACTIVITY_TYPE = 401 OR A.ACTIVITY_TYPE = 411)) RETURN_QTY, AT.DESCRIPTION, CASE WHEN (AT.ACTIVITY_TYPE = 400) OR (AT.ACTIVITY_TYPE = 401) OR (AT.ACTIVITY_TYPE = 410) OR (AT.ACTIVITY_TYPE = 411) OR (AT.ACTIVITY_TYPE = 420) THEN 'Submit' WHEN (AT.ACTIVITY_TYPE = 402) THEN 'Save Draft' END AS ACTION, AL.DURATION FROM ACTIVITY_LOG AL, ACTIVITY_TYPE AT WHERE AL.ACTIVITY_TYPE = AT.ACTIVITY_TYPE AND AT.MODULE = 'POU'
Possibly Referenced Tables/Views:
|