Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

inconsistent ODBC error in a report

Status
Not open for further replies.

ken2834

Technical User
Jun 26, 2006
27
US
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.

 
Hi, Ken

Is this Crystal Reports?

Regards,


William Chadbourne
Oracle DBA
 
Suggest turn on ODBC tracing (in the DSN configuration screen), note the location of the log file, run the query, turn off tracing, then open the file and look for any errors and post them back.

Regards
Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top