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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting ODBC Error. Query is too complex

Status
Not open for further replies.

majordog

Programmer
Jul 8, 2002
222
CA
Hey All,
I have some pretty heavy calculations to do in a report. I thought I had solved everything when I was hit with the error: ODBC Error:[Microsoft][Microsoft Access Driver] Query is too complex
Followed by: Error detected by database dll

The calculations I have are all broken down into pieces and I placed them into formula fields. They are all placed on the report, but some are not visible. Also, the calculation is performed in a Cross-Tab report, So these calculations would be generated for each column that is created ( Columns in cross-tab are based on existence of data in db so some records may have 3 columns, next might have five, etc...). I am looking for a way to do these calc's inside this cross-tab successfully...I thought I had it but...Any suggestions?:

avzero = ({prezero} + {postzero})/2
avspan = ({prespanmr} + {postspanmr})/2
cvzero = 0
cvspan = (const + x * cvspan + x^2 * cvspan^2 + x^3 * cvspan^3 + x^4 * cvspan^4 + x^5 * cvspan^5)

gain = (cvspan - cvzero)/(avspan - avzero)
offset = ((cvzero * avspan) - (cvspan * avzero))/(avspan - avzero)

adjsamp = (gain * {sampmr} + offset)
adjamb = (gain * {ambmr} + offset)
 
I just wanted to continue above discussion. Through some testing, the formula for cvspan thows the error, it is too complex. I tried to break it down into pieces, but still not accepted. I am currently using an Access database through ODBC System DSN. But I am going to set this all up in the MS SQL dev db...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top