2

I'm attempting to use an outer apply in an access pass-through query; however, it seems to have issues with the outer apply. The query is below. It runs fine in SQL Server directly, but when run as a pass-through query, I get a syntax error in the FROM clause.

The syntax error text is: "Syntax error in FROM clause" The pass-through will run and produce data when I text run it; however, when I attempt to save it for the report, the validation issue occurs.

SELECT AccountNumber, ICN, Provider, RequestDate, patLast, patFirst
FROM tblracaccounts
OUTER APPLY (
SELECT TOP 1 patLast, patFirst FROM tblAccts WHERE LEFT(icn,14)=LEFT(tblracaccounts.ICN,14)
) t2
WHERE ICN NOT IN (SELECT ICN FROM tblracstatuses WHERE Cancelled=1 OR Findings='No Findings')
ORDER BY Provider, RequestDate DESC
4

1 回答 1

2

报表不允许将外部应用作为直接在报表中的传递查询。将查询移至访问传递查询,然后在报表中引用该查询即可。

于 2012-12-17T16:27:36.707 回答