Oracle12C的存储过程创建的时候提示[Err] ORA-00972: identifier is too long,请问怎么处理呢?
@IdleMan 你好,想跟你请教个问题:
您好,我这个Oracle12C的存储过程创建的时候提示[Err] ORA-00972: identifier is too long,请问怎么处理呢?
/************************************************************************* * 存储过程名称: PR_ECOS_OP_CUSTFEEDBACK_HEAD_QUERY * 存储过程功能: 用户中差评登记表ECOS_Op_CustFeedBack_Head,查询数据 * 存储过程执行实例: EXEC PR_ECOS_OP_CUSTFEEDBACK_HEAD_QUERY '001','select','{JSON字符串}' *************************************************************************/ CREATE OR REPLACE PROCEDURE "PR_ECOS_OP_CUSTFEEDBACK_HEAD_QUERY" ( V_PAGE_NO IN VARCHAR2,--页面Number V_FUN_ID IN VARCHAR2,--页面Number,对应的功能方法ID --V_JSON_STR IN VARCHAR2,--前端传到后台的JSON字符串 V_OUT_RETURN OUT VARCHAR2,--子存储过程的输出参数,传递给主存储过程,主存储过程根据这个返回值判断执行子存储过程是否成功 V_OUT_JSON out clob --生成的json,返回给前段调用者 ) IS V_TOTAL VARCHAR(100); V_OU_MSG VARCHAR(3000); V_NUM number;--查询SHINHO."ECOS_Op_CustFeedBack_Head"表的全部记录数 BEGIN V_OUT_RETURN := ''; IF V_PAGE_NO ='001' AND V_FUN_ID ='select' THEN SELECT COUNT(1) into V_NUM FROM SHINHO."ECOS_Op_CustFeedBack_Head"; dbms_lob.append(V_OUT_JSON, '{'); dbms_lob.append(V_OUT_JSON, '"total":'); dbms_lob.append(V_OUT_JSON, V_NUM); dbms_lob.append(V_OUT_JSON, ','); dbms_lob.append(V_OUT_JSON, '"rows": ['); for item in(SELECT Row_ID, LinkOrderNumber, CustomerID, ReceiverName, Telephone, StoreName, Region, ReceiveAddress, OrderAmount, OrderDate, SendWarehouse, EventLevel, InternalServer, CostAmount, BackFreight, BackAddress, RecordStatus, CreateDate, CreaterID, ModifyDate, ModifierID, DeleteFlag, Note FROM ECOS_OP_CUSTFEEDBACK_HEAD ) loop dbms_lob.append(V_OUT_JSON, '{'); dbms_lob.append(V_OUT_JSON, '"Row_ID":'); dbms_lob.append(V_OUT_JSON, item.Row_ID); dbms_lob.append(V_OUT_JSON, ','); dbms_lob.append(V_OUT_JSON, '"LinkOrderNumber":'); dbms_lob.append(V_OUT_JSON, item.LinkOrderNumber); dbms_lob.append(V_OUT_JSON, ','); dbms_lob.append(V_OUT_JSON, '"CustomerID":'); dbms_lob.append(V_OUT_JSON, item.CustomerID); dbms_lob.append(V_OUT_JSON, ','); dbms_lob.append(V_OUT_JSON, '"ReceiverName":"'); dbms_lob.append(V_OUT_JSON, item.ReceiverName); dbms_lob.append(V_OUT_JSON, '"'); dbms_lob.append(V_OUT_JSON, ','); dbms_lob.append(V_OUT_JSON, '"Telephone":'); dbms_lob.append(V_OUT_JSON, item.Telephone); dbms_lob.append(V_OUT_JSON, ','); dbms_lob.append(V_OUT_JSON, '"StoreName":"'); dbms_lob.append(V_OUT_JSON, item.StoreName); dbms_lob.append(V_OUT_JSON, '"'); dbms_lob.append(V_OUT_JSON, ','); dbms_lob.append(V_OUT_JSON, '"Region":"'); dbms_lob.append(V_OUT_JSON, item.Region); dbms_lob.append(V_OUT_JSON, '"'); dbms_lob.append(V_OUT_JSON, ','); dbms_lob.append(V_OUT_JSON, '"ReceiveAddress":"'); dbms_lob.append(V_OUT_JSON, item.ReceiveAddress); dbms_lob.append(V_OUT_JSON, '"'); dbms_lob.append(V_OUT_JSON, ','); dbms_lob.append(V_OUT_JSON, '"OrderAmount":'); dbms_lob.append(V_OUT_JSON, item.OrderAmount); dbms_lob.append(V_OUT_JSON, ','); dbms_lob.append(V_OUT_JSON, '"OrderDate":"'); dbms_lob.append(V_OUT_JSON, item.OrderDate); dbms_lob.append(V_OUT_JSON, '"'); dbms_lob.append(V_OUT_JSON, ','); dbms_lob.append(V_OUT_JSON, '"SendWarehouse":"'); dbms_lob.append(V_OUT_JSON, item.SendWarehouse); dbms_lob.append(V_OUT_JSON, '"'); dbms_lob.append(V_OUT_JSON, ','); dbms_lob.append(V_OUT_JSON, '"EventLevel":"'); dbms_lob.append(V_OUT_JSON, item.EventLevel); dbms_lob.append(V_OUT_JSON, '"'); dbms_lob.append(V_OUT_JSON, ','); dbms_lob.append(V_OUT_JSON, '"InternalServer":"'); dbms_lob.append(V_OUT_JSON, item.InternalServer); dbms_lob.append(V_OUT_JSON, '"'); dbms_lob.append(V_OUT_JSON, ','); dbms_lob.append(V_OUT_JSON, '"CostAmount":'); dbms_lob.append(V_OUT_JSON, item.CostAmount); dbms_lob.append(V_OUT_JSON, ','); dbms_lob.append(V_OUT_JSON, '"BackFreight":"'); dbms_lob.append(V_OUT_JSON, item.BackFreight); dbms_lob.append(V_OUT_JSON, '"'); dbms_lob.append(V_OUT_JSON, ','); dbms_lob.append(V_OUT_JSON, '"BackAddress":"'); dbms_lob.append(V_OUT_JSON, item.BackAddress); dbms_lob.append(V_OUT_JSON, '"'); dbms_lob.append(V_OUT_JSON, ','); dbms_lob.append(V_OUT_JSON, '"RecordStatus":"'); dbms_lob.append(V_OUT_JSON, item.RecordStatus); dbms_lob.append(V_OUT_JSON, '"'); dbms_lob.append(V_OUT_JSON, ','); dbms_lob.append(V_OUT_JSON, '"CreateDate":"'); dbms_lob.append(V_OUT_JSON, item.CreateDate); dbms_lob.append(V_OUT_JSON, '"'); dbms_lob.append(V_OUT_JSON, ','); dbms_lob.append(V_OUT_JSON, '"CreaterID":'); dbms_lob.append(V_OUT_JSON, item.CreaterID); dbms_lob.append(V_OUT_JSON, ','); dbms_lob.append(V_OUT_JSON, '"ModifyDate":"'); dbms_lob.append(V_OUT_JSON, item.ModifyDate); dbms_lob.append(V_OUT_JSON, '"'); dbms_lob.append(V_OUT_JSON, ','); dbms_lob.append(V_OUT_JSON, '"ModifierID":'); dbms_lob.append(V_OUT_JSON, item.ModifierID); dbms_lob.append(V_OUT_JSON, ','); dbms_lob.append(V_OUT_JSON, '"DeleteFlag":'); dbms_lob.append(V_OUT_JSON, item.DeleteFlag); dbms_lob.append(V_OUT_JSON, ','); dbms_lob.append(V_OUT_JSON, '"Note":"'); dbms_lob.append(V_OUT_JSON, item.Note); dbms_lob.append(V_OUT_JSON, '"'); dbms_lob.append(V_OUT_JSON, '},'); end loop; SELECT SUBSTR(V_OUT_JSON, 0, length(V_OUT_JSON)-1) into V_OUT_JSON FROM DUAL; dbms_lob.append(V_OUT_JSON, '], "footer": null, "columns": null, "frozenColumns": null, "AttachRemark": null, "Attach": null}'); /* "Row_ID" NUMBER NOT , "LinkOrderNumber" NUMBER , "CustomerID" NUMBER , "ReceiverName" VARCHAR2(50 BYTE) , "Telephone" NUMBER , "StoreName" VARCHAR2(255 BYTE) , "Region" VARCHAR2(255 BYTE) , "ReceiveAddress" VARCHAR2(255 BYTE) , "OrderAmount" NUMBER , "OrderDate" DATE , "SendWarehouse" VARCHAR2(255 BYTE) , "EventLevel" VARCHAR2(255 BYTE) , "InternalServer" VARCHAR2(255 BYTE) , "CostAmount" NUMBER , "BackFreight" VARCHAR2(255 BYTE) , "BackAddress" VARCHAR2(255 BYTE) , "RecordStatus" VARCHAR2(255 BYTE) , "CreateDate" DATE DEFAULT , "CreaterID" NUMBER , "ModifyDate" DATE , "ModifierID" NUMBER , "DeleteFlag" NUMBER, "Note" VARCHAR2(255 BYTE) SELECT ""TOTAL""||":"|| "COUNT"(1) INTO V_TOTAL FROM SHINHO."ECOS_Op_CustFeedBack_Head" */ --COMMIT;查询时不需要COMMIT V_OUT_RETURN := 'OK'; EXCEPTION WHEN OTHERS THEN V_OUT_RETURN := 'ERROR'; V_OU_MSG := '失败,原因是:' || SQLERRM; ROLLBACK; INSERT INTO SYS_ERROR_LOG (ROW_ID, PR_NAME, ERROR_DESC, INSDT) VALUES (SYS_ERROR_LOG_SEQ.NEXTVAL, 'PR_ECOS_OP_CUSTFEEDBACK_HEAD_QUERY', V_OU_MSG, SYSDATE); COMMIT; END
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
"PR_ECOS_OP_CUSTFEEDBACK_HEAD_QUERY"
改短