版本K3CLOUD 5.0 数据库:Oracle 11G
联系方式:771913520 [qq]771913520[/qq]
按照此方式查询会出现报错,每次都还不一样
[quote]报错提示1:[/quote]
[code]
查询出现异常。Kingdee.BOS.SQL.Exception.ParserException: parse error. detail message is :
Error: expect token type 'Identifier', but current token type is 'Keyword', token value is ON, at line 1, column 82.
source sql is :
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = '') CREATE INDEX ON (FGUID) ---> Kingdee.BOS.SQL.Exception.ParserException:
Error: expect token type 'Identifier', but current token type is 'Keyword', token value is ON, at line 1, column 82.
在 Kingdee.BOS.SQL.Parser.TokenList.match(Int32 tokType)
在 Kingdee.BOS.SQL.Parser.SqlStmtParser.parseCreateIndex(String createWord)
在 Kingdee.BOS.SQL.Parser.SqlStmtParser.stmt()
在 Kingdee.BOS.SQL.Parser.SqlStmtParser.parseIf()
在 Kingdee.BOS.SQL.Parser.SqlStmtParser.stmt()
在 Kingdee.BOS.SQL.Parser.SqlStmtParser.stmtList(IList stmtCol, Token tok)
在 Kingdee.BOS.SQL.TransUtil.getStmtList(String ksql)
--- 内部异常堆栈跟踪的结尾 ---
Server stack trace:
在 Kingdee.BOS.SQL.TransUtil.getStmtList(String ksql)
在 Kingdee.BOS.SQL.TransUtil.Translate(String kSql, Int32 targetDbType, FormatOptions options)
在 Kingdee.BOS.App.Data.AbstractDatabase.CreateCommandByCommandType(CommandType commandType, String commandText, Boolean needTranslate, Int32 commandTimeout)
在 Kingdee.BOS.App.Data.DBUtils.Execute(Context ctx, String strSQL, IEnumerable`1 paramList, Boolean needTranslate)
在 Kingdee.BOS.App.Data.DBUtils.Execute(Context ctx, String strSQL)
在 Kingdee.K3.SCM.App.Stock.Report.StockRptCommon.CreateFullTableIndex()
在 Kingdee.K3.SCM.App.Stock.Report.StockRptCommon.GetPageDt(IRptParams filter)
在 Kingdee.K3.SCM.App.Stock.Report.StockDetailRpt.GetList(IRptParams filter)
在 Kingdee.BOS.Core.Report.PlugIn.AbstractSysReportServicePlugIn.GetListAndReportData(IRptParams filter)
在 Kingdee.BOS.App.Core.PlugInProxy.SysReportServicePlugInProxy.GetListAndReportData(MoveReportServiceParameter parameter)
在 Kingdee.BOS.App.Core.SysReportService.GetListAndReportData(MoveReportServiceParameter parameter)
Exception rethrown at [0]:
在 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
在 Kingdee.BOS.Contracts.ISysReportService.GetListAndReportData(MoveReportServiceParameter parameter)
在 Kingdee.BOS.ServiceHelper.SysReportServiceHelper.GetListAndReportData(MoveReportServiceParameter parameter)
在 Kingdee.BOS.Model.Report.MoveReportModel.GetData(Int32 start, Int32 rows)
在 Kingdee.BOS.Web.Report.SysReportView.GetListData()
在 Kingdee.BOS.Web.Report.SysReportView.<>c__DisplayClass3d.
[quote]报错提示2:[/quote]
[code]
查询出现异常。ORA-01652: unable to extend temp segment by 128 in tablespace CLOUD_T_BW_STANDARD
INSERT /*+ APPEND */ INTO TMP7F35106A475311E680DA000C295 (FGUID,FIOPRICE,FDATE,FSTOCKID,FSTOCKSTATUSID,FOWNERTYPEID, FMATERIALID)
WITH TPC AS (SELECT T0.* FROM (
SELECT CAST(NVL(TSEF.FCOSTPRICE,0)*NVL(TSF.FEXCHANGERATE,1) AS DECIMAL(23,10)) AS FIOPRICE,TO_CHAR(TS.FCREATEDATE, 'YYYY-MM-DD HH24:MI:SS') AS FBIZDATE,
TSE.FSTOCKID,TSE.FSTOCKSTATUSID,TSE.FOWNERTYPEID,TSE.FMATERIALID AS FMATERIALID
FROM T_SAL_OUTSTOCKENTRY TSE
INNER JOIN T_SAL_OUTSTOCKENTRY_F TSEF ON TSE.FID=TSEF.FID AND TSE.FENTRYID=TSEF.FENTRYID
INNER JOIN T_SAL_OUTSTOCK TS ON TSE.FID=TS.FID AND TS.FDOCUMENTSTATUS<>'Z' AND TS.FCANCELSTATUS='A'
INNER JOIN T_SAL_OUTSTOCKFIN TSF ON TSE.FID=TSF.FID
WHERE TS.FCREATEDATE >= :BegDate AND TS.FSTOCKORGID = 103538 AND NVL(TSEF.FCOSTPRICE,0)<>0
UNION ALL
SELECT NVL(TSE.FPRICE,0) AS FIOPRICE,TO_CHAR(TS.FCREATEDATE, 'YYYY-MM-DD HH24:MI:SS') AS FBIZDATE,
TSE.FSTOCKID,TSE.FSTOCKSTATUSID,TSE.FOWNERTYPEID,TSE.FMATERIALID AS FMATERIALID
FROM T_STK_MISDELIVERYENTRY TSE
INNER JOIN T_STK_MISDELIVERY TS ON TSE.FID=TS.FID AND TS.FDOCUMENTSTATUS<>'Z' AND TS.FCANCELSTATUS='A'
WHERE TS.FCREATEDATE >= :BegDate AND TS.FSTOCKORGID = 103538 AND NVL(TSE.FPRICE,0)<>0
UNION ALL
SELECT NVL(TSE.FPRICE,0) AS FIOPRICE,TO_CHAR(TS.FCREATEDATE, 'YYYY-MM-DD HH24:MI:SS') AS FBIZDATE,
TSE.FSTOCKID,TSE.FSTOCKSTATUSID,TSEA.FOWNERTYPEID,TSE.FMATERIALID AS FMATERIALID
FROM T_PRD_PICKMTRLDATA TSE
INNER JOIN T_PRD_PICKMTRLDATA_A TSEA ON TSE.FENTRYID=TSE.FENTRYID
INNER JOIN T_PRD_PICKMTRL TS ON TSE.FID=TS.FID AND TS.FDOCUMENTSTATUS<>'Z' AND TS.FCANCELSTATUS='A'
WHERE TS.FCREATEDATE >= :BegDate AND TS.FSTOCKORGID = 103538 AND NVL(TSE.FPRICE,0)<>0
) T0 INNER JOIN TMP7F351069475311E680DA000C295 T1 ON T0.FMATERIALID=T1.FMATERIALID )
SELECT LOWER(SYS_GUID()), MAX(TPC.FIOPRICE) FIOPRICE, MAX(TCC.FBIZDATE) FBIZDATE, TCC.FSTOCKID,TCC.FSTOCKSTATUSID,TCC.FOWNERTYPEID, TCC.FMATERIALID FROM (
SELECT MAX(FBIZDATE) FBIZDATE,FSTOCKID,FSTOCKSTATUSID,FOWNERTYPEID, FMATERIALID FROM TPC GROUP BY FSTOCKID,FSTOCKSTATUSID,FOWNERTYPEID, FMATERIALID ) TCC
INNER JOIN TPC ON TCC.FBIZDATE = TPC.FBIZDATE AND TCC.FSTOCKID=TPC.FSTOCKID AND TCC.FSTOCKSTATUSID=TPC.FSTOCKSTATUSID AND TCC.FOWNERTYPEID=TPC.FOWNERTYPEID
GROUP BY TCC.FSTOCKID,TCC.FSTOCKSTATUSID,TCC.FOWNERTYPEID, TCC.FMATERIALID
Server stack trace:
在 Kingdee.BOS.App.Data.AbstractDatabase.ExecuteNonQuery(DbCommand command, IEnumerable`1 listParam)
在 Kingdee.BOS.App.Data.DBUtils.ExecuteWithTime(Context ctx, String strSQL, IEnumerable`1 paramList, Int32 commandTimeout)
在 Kingdee.K3.SCM.App.Stock.Report.StockDetailRpt.BuilderReportSqlAndTempTable(IRptParams filter, String tableName)
在 Kingdee.BOS.Core.Report.PlugIn.AbstractSysReportServicePlugIn.CreateTempTable(IRptParams filter, String tablename)
在 Kingdee.BOS.Core.Report.PlugIn.AbstractSysReportServicePlugIn.GetDataForVirtual(IRptParams filter)
在 Kingdee.BOS.Core.Report.PlugIn.AbstractSysReportServicePlugIn.GetListAndReportData(IRptParams filter)
在 Kingdee.BOS.App.Core.PlugInProxy.SysReportServicePlugInProxy.GetListAndReportData(MoveReportServiceParameter parameter)
在 Kingdee.BOS.App.Core.SysReportService.GetListAndReportData(MoveReportServiceParameter parameter)
Exception rethrown at [0]:
在 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
在 Kingdee.BOS.Contracts.ISysReportService.GetListAndReportData(MoveReportServiceParameter parameter)
在 Kingdee.BOS.ServiceHelper.SysReportServiceHelper.GetListAndReportData(MoveReportServiceParameter parameter)
在 Kingdee.BOS.Model.Report.MoveReportModel.GetData(Int32 start, Int32 rows)
在 Kingdee.BOS.Web.Report.SysReportView.GetListData()
在 Kingdee.BOS.Web.Report.SysReportView.<>c__DisplayClass3d.
[/code]
推荐阅读