oracle单行子查询返回多行 5
SELECTcount(*)FROMJD_VIEW_PR_QUERYwhereORL_RECVQTY>=0ANDsysdate<(SELECTmax(DCK_RECVDA...
SELECT count(*)FROM JD_VIEW_PR_QUERY where ORL_RECVQTY >=0 AND sysdate < (SELECT max(DCK_RECVDATE) FROM R5DOCKRECEIPTS T,R5ORDERS T3 WHERE T.DCK_ORDER IS NOT NULL AND T.DCK_ORDER = T3.ORD_CODE GROUP BY T.DCK_ORDER)
展开
1个回答
展开全部
单行子查询返回多于一个行
UPDATE LZ_CONT A SET (A.PYERNM) = (SELECT DISTINCT B.PYBKNA FROM SUNFRS.BEFIXSIGN B WHERE A.PYERBK = B.PYERBK) WHERE A.SIGNDT < '20141024';
这样试试,加一个distinct,因为(SELECT DISTINCT B.PYBKNA FROM SUNFRS.BEFIXSIGN B WHERE A.PYERBK = B.PYERBK)这个结果集里反回了多行颂丛数据,应该是重复的(如败樱携果你的逻辑没错的话察伏)加个distinct去重
UPDATE LZ_CONT A SET (A.PYERNM) = (SELECT DISTINCT B.PYBKNA FROM SUNFRS.BEFIXSIGN B WHERE A.PYERBK = B.PYERBK) WHERE A.SIGNDT < '20141024';
这样试试,加一个distinct,因为(SELECT DISTINCT B.PYBKNA FROM SUNFRS.BEFIXSIGN B WHERE A.PYERBK = B.PYERBK)这个结果集里反回了多行颂丛数据,应该是重复的(如败樱携果你的逻辑没错的话察伏)加个distinct去重
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询