ORACLEORA-00933:SQL命令未正确结束,
这个错误害我花了⼀天时间排查,最后原来是因为结束符,这种语句不能是分号,将分号即可执⾏成功。
MERGE INTO MO_TRADE_COUNT_DAY A USING ( SELECT MAX(flow_id) AS flowId, CHANNEL AS channel, SUM( RESULT ) AS tradeSuccess, COUNT( RESULT ) AS tradeTotal, AVG( RESPONSE_TIME ) AS responseTime, (COUNT( RESULT ) - SUM( RESULT )) AS tradeFail FROM SS_CHANNELFLOW_COUNT WHERE 1 = 1 AND CREATE_TIME >= to_date('2020-07-13 00:00:00','yyyy-mm-dd hh24:mi:ss') AND CREATE_TIME <= to_date('2020-07-13 23:59:59','yyyy-mm-dd hh24:mi:ss') GROUP BY CHANNEL ) C ON (
A.CHANNEL = C.CHANNEL AND A.CREATE_TIME = to_date('2020-07-13 00:00:00','yyyy-mm-dd hh24:mi:ss')) WHEN MATCHED THEN UPDATE SET "TRADE_TOTAL" = C.tradeTotal, "TRADE_SUCCESS" = C.tradeSuccess, "TRADE_FAIL" = C.tradeFail, "RESPONSE_TIME" = C.responseTime WHEN NOT MATCHED THEN INSERT ( "ID", "CHANNEL", "TRADE_TOTAL",oracle登录命令
"TRADE_SUCCESS", "TRADE_FAIL", "RESPONSE_TIME", "CREATE_TIME" ) VALUES ( C.flowId, C.CHANNEL, C.tradeTotal,
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论