I have a fairly cumbersome access query that joins 19 different values into one table. The values are pulled from several different data sources, but I think I need to get them in a single table so my report can display them.
If I run the query alone, it displays the data fine. If I launch the report, which uses the query as its recordsource, I get this ODBC error:
ODBC--call failed. [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'FROM'. (#156)[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 'SEGMENT_01. (#170)
I am wondering if I exceeded some limit for the query length that applies for report record sources but not for other methods of running a query. Does anyone have a guess why this would error out only when running it within a report?
This is the query:
SELECT TotCashPrevDay, InvMature_CurDay, TotCOSettle_CurDay, TotDNSettle_CurDay, TotRepoEligible, TotMemDeps_PrevDay, TotCOMature_CurDay, TotDNMature_CurDay, TotTermDeps_CurDay, TotReposMat_CurDay, TotAssSettle_CurDay, TotOFFMat, NonAdvMat7, TotRepoAgency, TotNonAgency, TotCOMature_5Day, TotDNMature_5Day, TotTermDeps_5Day, NonAdvAssetMat1y
FROM qryCash, qryInvestmentMaturities, qryCOSettlements, qryDNSettlements, qryRepoEligSecurities, qryMemberDeposits, qryCOMaturitiescheckthis, qryDNMaturities, qryTermDepositsMaturing, qryReposMaturing, qryAssetSettlements, qryOvernightFedFundsMaturing, qryNonAdvanceAssetsMat7, qryRepoEligAgencies, qryRepoEligNonAgencies, qryCOMaturities7Day, qryDNsMaturing7Days, qryTermDepsMat7, qryNonAdvAssetMat1yr;
There are no join parameters -- this query retrieves only one row.
If I run the query alone, it displays the data fine. If I launch the report, which uses the query as its recordsource, I get this ODBC error:
ODBC--call failed. [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'FROM'. (#156)[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 'SEGMENT_01. (#170)
I am wondering if I exceeded some limit for the query length that applies for report record sources but not for other methods of running a query. Does anyone have a guess why this would error out only when running it within a report?
This is the query:
SELECT TotCashPrevDay, InvMature_CurDay, TotCOSettle_CurDay, TotDNSettle_CurDay, TotRepoEligible, TotMemDeps_PrevDay, TotCOMature_CurDay, TotDNMature_CurDay, TotTermDeps_CurDay, TotReposMat_CurDay, TotAssSettle_CurDay, TotOFFMat, NonAdvMat7, TotRepoAgency, TotNonAgency, TotCOMature_5Day, TotDNMature_5Day, TotTermDeps_5Day, NonAdvAssetMat1y
FROM qryCash, qryInvestmentMaturities, qryCOSettlements, qryDNSettlements, qryRepoEligSecurities, qryMemberDeposits, qryCOMaturitiescheckthis, qryDNMaturities, qryTermDepositsMaturing, qryReposMaturing, qryAssetSettlements, qryOvernightFedFundsMaturing, qryNonAdvanceAssetsMat7, qryRepoEligAgencies, qryRepoEligNonAgencies, qryCOMaturities7Day, qryDNsMaturing7Days, qryTermDepsMat7, qryNonAdvAssetMat1yr;
There are no join parameters -- this query retrieves only one row.