SQL(正在进行的数据库中):多个左联接上的E_FAIL状态

时间:2019-04-30 07:34:13

标签: sql openedge progress-4gl progress-db

我一直在进度数据库上使用SQL(我确定它使用的是SQL92)

我收到错误:

  

数据提供者或其他服务返回E_FAIL状态

我相信这与我的SQL查询有关,因为相同的表在具有基本选择查询的其他报表中也可以工作

代码如下:

Select * FROM

(Select * FROM

(Select "dtrs-AccountBal", "dtrs-AccNumber", "dtrs-AccName", "dtrs-salesmanNumber"
FROM pub."dtrsMaster"
Where ("dtrs-AccountBal" > 10 OR "dtrs-AccountBal" < -10)) AS DTRS

LEFT JOIN

(Select "dtrs-AccNumber", Max("dt-documentNumber") AS "InvNo"
From pub."dtrsTransactions"
Where "dt-move" = 'INV'
GROUP BY "dtrs-AccNumber") AS DBTRTRAN

ON DTRS."dtrs-AccNumber" = DBTRTRAN."dtrs-AccNumber") AS TEMP

LEFT JOIN

(Select "sm-customerName", "vm-datesold", "vm-invno", "vm-serial", "vm-stockNumber"
FROM pub."stockMaster"
Where "vm-sold" = 1) AS STK

ON TEMP."InvNo" = STK."vm-invno"

有人可以帮助我吗?

预先感谢

0 个答案:

没有答案