Query is too complex (Too much data?)

krausr79

Registered User.
Local time
Today, 03:43
Joined
Oct 5, 2012
Messages
26
I have a set of over 1 million records that I am designing queries for. To maintain sanity, I made a selective deletion query that leaves 1 out of every 500 rows left standing and deletes the rest and I test the queries on that. I've come to a point where I need to run queries on the full data, but when I do so, I get the error "The expression is typed incorrectly, or is too complex to be evaluated..."

The only change is that I'm using the full data set. What do I do now? The SQL of the query that won't run is
Code:
SELECT [Qry_PROH_By Dates_Julian].Input, [Qry_PROH_By Dates_Julian].PURCHDATE, [Qry_PROH_By Dates_Julian].IVDSC1, [Qry_PROH_By Dates_Julian].IVLITM, CDbl([CBPRRC]/10000) AS Cost, [Qry_PROH_By Dates_Julian].UNITPRICE, [Qry_PROH_By Dates_Julian].Qty, Qry_41061.CBUORG
FROM [Qry_PROH_By Dates_Julian] LEFT JOIN Qry_41061 ON [Qry_PROH_By Dates_Julian].IVLITM = Qry_41061.CBLITM
WHERE (((Qry_41061.CBUORG)<=[Qry_PROH_By Dates_Julian]![Qty]) AND ((Qry_41061.CBEFTJ)<[Qry_PROH_By Dates_Julian]![Julian]) AND ((Qry_41061.CBEXDJ)>[Qry_PROH_By Dates_Julian]![Julian]))
ORDER BY [Qry_PROH_By Dates_Julian].IVLITM, [Qry_PROH_By Dates_Julian].PURCHDATE;
 
Okay! The answer to my problem is that I was using cint() to convert text quantities in an earlier query. When I ran that query I got an 'overflow' error because the new data had quantities over 32000. I converted using clng instead, and the other query stopped giving up. XP
 

Users who are viewing this thread

Back
Top Bottom