2 hancheng5200 hancheng5200 于 2013.09.09 10:39 提问

FULL JOIN 搞死我了 ……高手进来

SELECT *
FROM (SELECT AFTERMARKET, SUM(LFIMG) AS LFIMG, NAME1
FROM (SELECT R.AFTERMARKET, ABS(LFIMG) AS LFIMG, NAME1
FROM ROS_SALES_DATA@ROS_LINK_TO_AIGUSER T,
RAP_COMPANY_CRMTOROS@ROS_LINK_TO_AIGUSER R
WHERE T.KUNNR = R.SELL
AND T.AUART IN
('ZEOR', 'ZIOR', 'ZKO', 'ZOOR', 'ZKE', 'ZSDS')) F
GROUP BY AFTERMARKET, NAME1) A
FULL JOIN (SELECT AFTERMARKET, SUM(ABS(TLFIMG)) AS TLFIMG, NAME1
FROM (SELECT R.AFTERMARKET,
TO_NUMBER(T.LFIMG) AS TLFIMG,
NAME1
FROM ROS_SALES_DATA@ROS_LINK_TO_AIGUSER T,
RAP_COMPANY_CRMTOROS@ROS_LINK_TO_AIGUSER R
WHERE R.AFTERMARKET = T.KUNNR
AND T.AUART IN ('ZDNE', 'ZDRE')) C
GROUP BY C.AFTERMARKET, C.NAME1) B

ON A.AFTERMARKET = B.AFTERMARKET;

SQL在上
在pl/sql中能查出来,当点击显示下一页显示行数超过100行就会执行很久都没结果
在程序中就会直接卡死不出来
求高手指教………………最好代替full join

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!