错误(57,5):PL / SQL:ORA-00984:此处不允许用于创建存储过程的列

时间:2019-05-28 05:19:17

标签: oracle stored-procedures

我创建了一个stored procedure,但在编译时却出现错误消息

  

错误(57,5):PL / SQL:ORA-00984:此处不允许使用列

下面是我的查询

create or replace PROCEDURE NEIQC_DATA_DUMP_MST AS 
BEGIN

execute immediate 'truncate table TBL_NEIQC_WF_SITE_MST';

INSERT INTO TBL_NEIQC_WF_SITE_MST

(
    OBJECTID,
    SAP_ID,
    NETWORK_ENTITY_ID    ,
    SITE_NAME            ,
    SITE_ADDRESS         ,
    MAINTENANCEZONE_CODE ,
    INVENTORY_TYPE       ,
    TYPE_NAME            ,
    SITE_STATUS_CODE     , 
    NE_MODIFIED_DATE     ,
    NE_MODIFIED_BY       ,
    CREATED_DATE         ,
    CREATED_BY           ,
    STRUCTURE_NAME       ,
    RJ_CITY_CODE         ,
    RJ_R4G_STATE_CODE    ,
    RJ_DISTRICT_CODE     ,
    RJ_TALUK_CODE        ,
    RJ_JC_CODE           ,
    RJ_JIOPOINT_SAPCODE  ,
    RJ_COMPANY_CODE_1    ,
    RJ_COMPANY_CODE_2    
)

VALUES

(
    OBJECTID                      ,
    RJ_SAPID,                      
    RJ_NETWORK_ENTITY_ID          ,
    RJ_SITE_NAME                  ,
    RJ_SITE_ADDRESS               ,
    RJ_MAINTENANCE_ZONE_CODE      ,
    '',
    TYPE_NAME                     ,
    'ACTIVE',
    RJ_LAST_MODIFIED_DATE,
    RJ_LAST_MODIFIED_BY ,
    SYSDATE,
    'SCHEDULER',
    STRUCTURE_NAME                ,
    RJ_CITY_CODE                  ,
    RJ_R4G_STATE_CODE             ,
    RJ_DISTRICT_CODE              ,
    RJ_TALUK_CODE                 ,
    RJ_JC_CODE                    ,
    RJ_JIOPOINT_SAPCODE           ,
    RJ_COMPANY_CODE_1             ,
    RJ_COMPANY_CODE_2          
);
 
COMMIT; 

END NEIQC_DATA_DUMP_MST;

请提示出什么问题

1 个答案:

答案 0 :(得分:1)

您的插入语句应类似于

INSERT INTO TBL_NEIQC_WF_SITE_MST

(
    OBJECTID,
    SAP_ID,
    NETWORK_ENTITY_ID    ,
    SITE_NAME            ,
    SITE_ADDRESS         ,
    MAINTENANCEZONE_CODE ,
    INVENTORY_TYPE       ,
    TYPE_NAME            ,
    SITE_STATUS_CODE     , 
    NE_MODIFIED_DATE     ,
    NE_MODIFIED_BY       ,
    CREATED_DATE         ,
    CREATED_BY           ,
    STRUCTURE_NAME       ,
    RJ_CITY_CODE         ,
    RJ_R4G_STATE_CODE    ,
    RJ_DISTRICT_CODE     ,
    RJ_TALUK_CODE        ,
    RJ_JC_CODE           ,
    RJ_JIOPOINT_SAPCODE  ,
    RJ_COMPANY_CODE_1    ,
    RJ_COMPANY_CODE_2    
)

select
    OBJECTID                      ,
    RJ_SAPID,                      
    RJ_NETWORK_ENTITY_ID          ,
    RJ_SITE_NAME                  ,
    RJ_SITE_ADDRESS               ,
    RJ_MAINTENANCE_ZONE_CODE      ,
    '',
    TYPE_NAME                     ,
    'ACTIVE',
    RJ_LAST_MODIFIED_DATE,
    RJ_LAST_MODIFIED_BY ,
    SYSDATE,
    'SCHEDULER',
    STRUCTURE_NAME                ,
    RJ_CITY_CODE                  ,
    RJ_R4G_STATE_CODE             ,
    RJ_DISTRICT_CODE              ,
    RJ_TALUK_CODE                 ,
    RJ_JC_CODE                    ,
    RJ_JIOPOINT_SAPCODE           ,
    RJ_COMPANY_CODE_1             ,
    RJ_COMPANY_CODE_2          
  from ne_structures -- if this is your table

;