oracle视图创建错误ora-00933

时间:2017-01-09 10:00:14

标签: oracle

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;

我收到错误:

  

-ORA-00933:SQL命令未正确结束

1 个答案:

答案 0 :(得分:0)

您可能需要:

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.pr_data_admin DA
        INNER JOIN
           PEGADATA.pc_assign_workbasket ON pxAssignedOperatorID = DA.pyWorkBasket;