|
版本: |
BeX5V3.5 |
小版本号: |
|
|
|
数据库: |
MS SQLServer |
服务器操作系统: |
Windows |
应用服务器: |
Tomcat |
客户端操作系统: |
Windows 7 |
浏览器: |
Chrome |
|
|
SELECT
tabMICAPList.*, CASE
WHEN tabMICAPList.fIsSubmit = '1' THEN
'Submitted'
END AS fIsSubmit1,
CASE
WHEN tabMICAPList.fIsMany = '1' THEN
'Yes'
ELSE
'No'
END AS fIsMany1,
TabEachQuantityDetails.ShipmentQty AS ShipmentQty
FROM
tabMICAPList tabMICAPList optional
JOIN (
SELECT
SUM (shipmentQty) AS ShipmentQty,
fOrderNo,
fSn
FROM
TabEachQuantityDetails
GROUP BY
fOrderNo,
fSn
) TabEachQuantityDetails ON tabMICAPList.fOrderNo = TabEachQuantityDetails.fOrderNo
AND tabMICAPList.fSn = TabEachQuantityDetails.fSn
WHERE
tabMICAPList.fIsDelete = 0
以上,optional join 里面写了个子查询,系统报ksql语法错误,缺少有括号。optional换成left是可以执行的,求指点!!!!!!!!
|
|