Pervasive-SQL,INNER JOIN与UNION结果

时间:2017-08-25 19:12:42

标签: pervasive pervasive-sql

我尝试使用UNION子查询的结果返回JOIN表。但是我从下面的查询中得到语法错误。是否可以使用Pervasive数据库实现此类任务?我正在使用Pervasive v8。

SELECT * FROM 
Table1 INNER JOIN Table2 ON Table1.BKAR_INV_NUM = Table2.BKAR_INVL_INVNM 
INNER JOIN 
(
SELECT BKAR_INVL_INVNM as SO_Num, BKAR_INVL_CNTR as Line, BKAR_INVL_ASD as Due_Date FROM Table3 
UNION SELECT BKAR_INVL_INVNM as SO_Num, BKAR_INVL_CNTR as Line, BKAR_INVL_ASD as Due_Date FROM Table4 WHERE BKAR_INVL_ASD IS NOT NULL
) AS SubTable 
ON SubTable.SO_Num = Table1.BKAR_INV_SONUM AND SubTable.Line = Table2.BKAR_INVL_CNTR

1 个答案:

答案 0 :(得分:0)

根据我的研究,Pervasive v8支持UNION,但它不支持子查询。