oracle数据库建表时出现错误:缺失右括号

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/rong05151005/article/details/78783401

oracle数据库建表时出现错误:缺失右括号

这个错误一般都是用了oracle中没有的语法导致的,比如:identity函数是SQLSERVER中的,oracle中不能用;数字型定义在oracle中须全写number,只写num也会报这个错误。

调试方法:逐行注释

展开阅读全文

ora-00907: 缺失括号

11-14

在pl/sql里执行  报此错rnselect TEMQ_1f040dd124f08b2ce1.GW GW,rn TEMQ_1f040dd124f08b2cb2.GZRQ GZRQ,rn TEMQ_1f040dd124f08b2bd8.DH DH,rn TEMQ_1f040dd124f08b2bd8.XKHSM XKHSM,rn TEMQ_1f040dd124f08b2c83.KHZS KHZS,rn TEMQ_1f040dd124f08b2c83.KHZS - TEMQ_1f040dd124f08b2bd8.XKHSM LKHZS,rn TEMQ_1f040dd124f08b2cb2.LDZS LDZS,rn TEMQ_1f040dd124f08b2cb2.QDZS QDZS,rn TEMQ_1f040dd124f08b2cb2.QFZS QFZS,rn TEMQ_1f040dd124f08b2d20.QYTS QYTS,rn TEMQ_1f040dd124f08b2d20.MJ MJ,rn TEMQ_1f040dd124f08b2d20.JE JE,rn TEMQ_1f040dd124f08b2d20.YSJE YSJE,rn TEMQ_1f040dd124f08b2d20.QKJE QKJE,rn sum(TEMQ_1f040dd124f08b2cb2.LFZS) LFZSrn from TEMQ_1f040dd124f08b2cb2,rn TEMQ_1f040dd124f08b2bd8,rn TEMQ_1f040dd124f08b2c83,rn TEMQ_1f040dd124f08b2d20,rn TEMQ_1f040dd124f08b2ce1rn where TEMQ_1f040dd124f08b2cb2.GZRQ = TEMQ_1f040dd124f08b2bd8.DJRQrn and TEMQ_1f040dd124f08b2cb2.GZRQ = TEMQ_1f040dd124f08b2c83.GZRQrn and TEMQ_1f040dd124f08b2cb2.GZRQ = TEMQ_1f040dd124f08b2d20.QYRQrn and TEMQ_1f040dd124f08b2cb2.PK_PSNDOC =rn TEMQ_1f040dd124f08b2ce1.PK_PSNDOCrn and ((TEMQ_1f040dd124f08b2ce1.PK_CORP = '1008') andrn (TEMQ_1f040dd124f08b2bd8.PK_PSNDOC = '0001G510000000001X90') andrn (TEMQ_1f040dd124f08b2c83.PK_PSNDOC = '0001G510000000001X90') andrn (TEMQ_1f040dd124f08b2cb2.PK_PSNDOC = '0001G510000000001X90') andrn (TEMQ_1f040dd124f08b2d20.PK_PSNDOC = '0001G510000000001X90') andrn (TEMQ_1f040dd124f08b2ce1.PK_PSNDOC = '0001G510000000001X90') andrn (TEMQ_1f040dd124f08b2bd8.PK_PROJECT = '0001G510000000000E8S') andrn (TEMQ_1f040dd124f08b2c83.PK_PROJECT = '0001G510000000000E8S') andrn (TEMQ_1f040dd124f08b2cb2.PK_PROJECT = '0001G510000000000E8S') andrn (TEMQ_1f040dd124f08b2d20.PK_PROJECT = '0001G510000000000E8S') andrn (TEMQ_1f040dd124f08b2ce1.PK_PROJECT = '0001G510000000000E8S') andrn (TEMQ_1f040dd124f08b2cb2.GZRQ >= 'select trunc(next_day(to_date('rn 2009 - 10 - 30 ', ' yyyy - mm - dd '), 1) - 6) from dual') andrn (TEMQ_1f040dd124f08b2cb2.GZRQ <= 'select trunc(next_day(to_date('rn 2009 - 10 - 30 ', ' yyyy - mm - dd '), 1) ) from dual'))rn group by TEMQ_1f040dd124f08b2ce1.GW,rn TEMQ_1f040dd124f08b2cb2.GZRQ,rn TEMQ_1f040dd124f08b2bd8.DH,rn TEMQ_1f040dd124f08b2bd8.XKHSM,rn TEMQ_1f040dd124f08b2c83.KHZS,rn TEMQ_1f040dd124f08b2c83.KHZS - TEMQ_1f040dd124f08b2bd8.XKHSM,rn TEMQ_1f040dd124f08b2cb2.LDZS,rn TEMQ_1f040dd124f08b2cb2.QDZS,rn TEMQ_1f040dd124f08b2cb2.QFZS,rn TEMQ_1f040dd124f08b2d20.QYTS,rn TEMQ_1f040dd124f08b2d20.MJ,rn TEMQ_1f040dd124f08b2d20.JE,rn TEMQ_1f040dd124f08b2d20.YSJE,rn TEMQ_1f040dd124f08b2d20.QKJErn请赐教 论坛

ora-00907 缺失括号?????

01-07

SELECT /*+ parallel (statcmain )*/ rn sum(decode(statcmain.certitype,''P'', 1,decode(statcmain.endortype, ''19'', ''-1'', 0))) as Count, rn sum((STATCMAIN.CHGPREMIUM - STATCMAIN.CHGMIDDLECOST) * STATCMAIN.CNYEXCHRATE * STATCMAIN.COINSRATE / 100) as premium, rn sum(STATCMAIN.CHGINSURED * STATCMAIN.CNYEXCHRATE * STATCMAIN.COINSRATE / 100) as amount, rn sum(STATCMAIN.CHGLIMIT * STATCMAIN.CNYEXCHRATE * STATCMAIN.COINSRATE / 100) as limit rn FROM rep.Statcmain, rn reptest.statcogsharerate, rn rep.statdcompanylevel rn where Statcmain.Policyno = statcogsharerate.policyno(+) rn and statcmain.comcode = statdcompanylevel.comcode rn and statcmain.riskcode NOT IN (''YAB0'', ''2797'', ''2798'') rn AND STATCMAIN.CLASSCODE <> ''30'' rn group by statcmain.statdate, rn statcmain.StartDate, rn statcmain.COMCODE, rn decode(statcmain.riskcode, rn ''2700'', rn statcmain.productcode, rn statcmain.riskcode), rn statcmain.SHAREHOLDERFLAG, rn statcmain.BUSINESSNATURE, rn ((substr(statcmain.othflag, 1, 1))), rn statdcompanylevel.centercode, rn statcmain.Agentcode, rn statcmain.Handler1code, rn decode(substr(statcmain.othflag, 15, 1), rn NULL, rn ''0'', rn substr(statcmain.othflag, 15, 1)), rn statcmain.BusinessKind, rn statcmain.BusinessClass, rn CASE WHEN (statcmain.businessflag IS NULL OR statcmain.businessflag <> ''1'') THEN (''0'') rn ELSE (''1'') END, rn statcmain.businesssource, rn statcmain.constructtype,rn statcmain.channeltype,rn statcmain.servicearea,rn statcmain.agriFlag,rn statcmain.usenaturecode,rn statcmain.carkindcode,rn statcmain.toncount,rn statcmain.applitype,rn statcmain.ventureflag, rn statcmain.grouppurchaseflag;rn 论坛

没有更多推荐了,返回首页