-4
CREATE VIEW PEGADATA.LIST_WORKLIST_WB_ITEMS AS
SELECT pxRefObjectInsName AS CASEID, pyAssignmentStatus AS STATUS, pxCreateDateTime AS CREATEDATETIME, pxAssignedOperatorID AS ASSIGNEDTO, pxGoalTime AS GOALTIME, pxDeadlineTime AS DEADLINETIME, pxGoalExecute AS GOALEXECUTETIME, pxDeadlineExecute AS DEADLINEEXECUTETIME, pxRefObjectClass AS REFERENCEDOBJCLASS, pxApplication AS APPLICATIONNAME, pyFlowType AS FLOWTYPE, pzInsKey AS INSTANCEHANDLEKEY, pxWorkGroup AS WORKGROUP, pxAssignedUserName AS ASSIGNEDUSERNAME
FROM PEGADATA.pc_assign_worklist
UNION
SELECT pxRefObjectInsName AS CASEID, pyAssignmentStatus AS STATUS, pxCreateDateTime AS CREATEDATETIME, pxAssignedOperatorID AS ASSIGNEDTO, pxGoalTime AS GOALTIME, pxDeadlineTime AS DEADLINETIME, pxGoalExecute AS GOALEXECUTETIME, pxDeadlineExecute AS DEADLINEEXECUTETIME, pxRefObjectClass AS REFERENCEDOBJCLASS, pxApplication AS APPLICATIONNAME, pyFlowType AS FLOWTYPE, pzInsKey AS INSTANCEHANDLEKEY, pxWorkGroup AS WORKGROUP, DA.pyLabel AS ASSIGNEDUSERNAME
FROM PEGADATA.pc_assign_workbasket, PEGADATA.pr_data_admin AS DA WHERE INNER JOIN PEGADATA.pc_assign_workbasket ON pxAssignedOperatorID = DA.pyWorkBasket;
我得到錯誤:Oracle視圖創建錯誤ORA-00933
-ORA-00933: SQL command not properly ended
不能使用'定義了一個表的別名時AS';但是WHERE INNER JOIN部分應該做的是什麼?回過頭再看看語法圖;並且不要將舊式語法(多個以逗號分隔的表格)與較新的連接語法混合使用,即使您將各個部分正確對待 - 最好只使用較新的「JOIN ... ON」樣式。 –