SPF_SUR_BWO_OVW

(SQL View)
Index Back

Work Order Survey Bu Op View

Work orders that have surveys for a specific business unit for the oprid

SELECT DISTINCT A.BUSINESS_UNIT , O.OPRID , B.WORK_ORDER_ID , B.BUSINESS_UNIT_PC , B.PROJECT_ID , B.SP_SURVEY_ID , B.WO_STATUS FROM PS_SPF_WO_SUR_USR A ,PS_SPF_WORDERREC B ,PSOPRALIAS O WHERE A.BUSINESS_UNIT = B.BUSINESS_UNIT AND A.WORK_ORDER_ID = B.WORK_ORDER_ID AND (B.WO_CLIID = O.OPRID OR B.ROW_CREATE_USER = O.OPRID OR A.USERID = O.OPRID OR O.OPRID IN ( SELECT C.USERID FROM PS_SPF_WO_SUR_USR C WHERE C.BUSINESS_UNIT = A.BUSINESS_UNIT AND C.WORK_ORDER_ID = A.WORK_ORDER_ID AND C.SP_SURVEY_ID = A.SP_SURVEY_ID AND C.SP_SUR_FILL_STATUS <> 'C')) AND B.WO_STATUS IN ('C','N','T','F') AND B.SP_SURVEY_ID <> ' ' AND A.NOTIFY_DATE IS NOT NULL AND A.SP_SUR_FILL_STATUS <> 'D'

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
2 OPRID Character(30) VARCHAR2(30) NOT NULL A user's ID (see PSOPRDEFN).
3 WORK_ORDER_ID Character(15) VARCHAR2(15) NOT NULL Work Order ID

Prompt Table: SPF_WO_SUR_VW

4 BUSINESS_UNIT_PC Character(5) VARCHAR2(5) NOT NULL PC Business Unit
5 PROJECT_ID Character(15) VARCHAR2(15) NOT NULL Project Id ChartField
6 SP_SURVEY_ID Character(18) VARCHAR2(18) NOT NULL sPro Work Order Survey Identifier
7 WO_STATUS Character(1) VARCHAR2(1) NOT NULL Work Order Status
A=Approved
C=Closed
D=Denied
F=Finalize
L=Released
N=Canceled
O=Open
P=Pending Terminate
S=Submitted
T=Terminated