错误提示:
SELECT * FROM LOG_MESSAGE ORDER BY LOG_DATE DESC;
--ORA-01422: 实际返回的行数超出请求的行数ORA-06512: 在 "STG.SAP_SO_BOM_PROC", line 494
--ORA-06512: 在 "STG.SAP_SO_BOM_PROC", line 1116
000000101001040220/2023/P229/000000102001002528/000000102001001400/2110
原因:SQL语句 二返回了两条工艺路径导致报错。
查询过程 :
SQL语句 一:
SELECT SO_ID, SO_LINE_ID, SITE_ID, PITEM, CITEM, N_CITEM, LOC_ID, CTYPE || ROWNO AS CTYPE FROM SAP_SO_BOM WHERE SAP_SO_BOM.CTYPE = 'P' and pitem='000000101001040220';
SQL语句二:
SELECT MAPL.PLNNR || '_' || MAPL.WERKS ROUTING_ID FROM SAP_MAPL_QMCUSTOMER MAPL WHERE MAPL.MATNR = '000000101001040220' --PITEM AND MAPL.WERKS = '2023' AND EXISTS (SELECT NULL FROM SAP_MAPL_QMCUSTOMER WHERE SAP_MAPL_QMCUSTOMER.MATNR = '000000101001040220' AND SAP_MAPL_QMCUSTOMER.WERKS = '2023')--SITEID