Troubleshooting
Problem
Receiving an error during reorder ORA-01427.
Symptom
Excerpt from the systemout.log
insert into reorderpad (prqty, poqty, reorderqty, reservedqty, explotqty, curbal, orgid, siteid, usrname, itemnum, itemsetid, location, vendor, manufacturer, modelnum,
catalogcode, minlevel, orderqty, orderunit, deliverytime, gldebitacct, glaccount, linetype, inspectionrequired, mktplcitem, storeloc, storelocsite,consignment, shippedqty)
select 0, 0, 0, 0, 0, 0, 'EAGLENA' , 'BEDFORD' , 'ITEMSET1' ,itemnum, itemsetid,location, vendor, manufacturer, modelnum,
catalogcode, minlevel, orderqty, orderunit, deliverytime, controlacc, glaccount, 'ITEM' , 0, 0, storeloc, storelocsiteid,consignment,0
from inventory where (((status != 'OBSOLETE' and category = 'STK' and siteid = 'BEDFORD')) and (exists (select 1 from item where itemnum = inventory.itemnum and itemtype in (select value from synonymdomain where domainid='ITEMTYPE' and maxvalue = 'ITEM'))) and location= 'CENTRAL' and siteid = 'BEDFORD' and itemnum in (select itemnum from item where itemtype in (select value from synonymdomain where domainid = 'ITEMTYPE' and maxvalue = 'ITEM')) and status in ( 'ACTIVE' , 'PLANNING' ) and reorder=1 and orderqty >0)
update reorderpad set lottype=(select lottype from item where item.itemnum=reorderpad.itemnum and item.itemsetid=reorderpad.itemsetid),
description=(select description from item where item.itemnum=reorderpad.itemnum and item.itemsetid=reorderpad.itemsetid),
in19=(select in19 from item where item.itemnum=reorderpad.itemnum and item.itemsetid=reorderpad.itemsetid),
in20=(select in20 from item where item.itemnum=reorderpad.itemnum and item.itemsetid=reorderpad.itemsetid),
in21=(select in21 from item where item.itemnum=reorderpad.itemnum and item.itemsetid=reorderpad.itemsetid),
in22=(select in22 from item where item.itemnum=reorderpad.itemnum and item.itemsetid=reorderpad.itemsetid),
in23=(select in23 from item where item.itemnum=reorderpad.itemnum and item.itemsetid=reorderpad.itemsetid)
where usrname= 'MAXADMIN' and location= 'CENTRAL' and itemnum is not null and siteid= 'BEDFORD'
java.sql.SQLException: ORA-01427: single-row subquery returns more than one row
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:131)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:204)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183)
at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:942)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222)
at oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1706)
at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1674)
at oracle.jdbc.driver.OracleStatementWrapper.executeUpdate(OracleStatementWrapper.java:275)
at psdi.mbo.DBShortcut.execute(DBShortcut.java:177)
at psdi.app.inventory.ReorderService.copyFromInvCost(ReorderService.java:1690)
at psdi.app.inventory.ReorderService.addStoreRoomParts(ReorderService.java:1481)
at psdi.app.inventory.ReorderService.getReorderSet(ReorderService.java:612)
at psdi.app.inventory.ReorderService.getReorderSet(ReorderService.java:1025)
at psdi.app.inventory.virtual.ReorderItemsSet.execute(ReorderItemsSet.java:176)
at psdi.webclient.beans.common.ReorderBean.reorderpad(ReorderBean.java:87)
at psdi.webclient.beans.common.ReorderBean.reorderpaditem(ReorderBean.java:208)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at psdi.webclient.system.session.AsyncProcess.run(AsyncProcess.java:144)
at java.lang.Thread.run(Thread.java:738)
Cause
Excerpt from the log file:
psdi.app.inventory.ReorderService.copyFromInvCost(ReorderService.java:1690)
Exception happens when copying From InvCost table during reorder.
Resolving The Problem
Remove duplicate rows in the invcost table
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
swg21625440