John Skolits
askolits at nni.com
Mon Sep 17 12:55:16 CDT 2007
For the heck of it, try making an alias for each table/query object in your query. In the past, I have done that and it fixed a 'Too Complex' message. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester Sent: Monday, September 17, 2007 11:37 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query is to complex I don't know what to think now. Took a snapshot of the SQL server data into local tables to send it to you and it ran. Something else is going on. Broke it into 2 queries against SQL server and it ran. I think I will leave it at that. Thanks for the offer. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Julie Reardon Sent: Monday, September 17, 2007 9:05 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Query is to complex Hi Chester, Any way you can send this to me? I would be happy to help if I could see a sampling of the data. Julie Reardon PRO-SOFT of NY, Inc. 44 Public Square, Suite 5 Watertown, NY 13601 Phone: 315.785.0319 Fax: 315.785.0323 NYS IT Contract#CMT026A NYS Certified Woman-Owned Business www.pro-soft.net -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester Sent: Monday, September 17, 2007 9:11 AM To: Access Developers discussion and problem solving Subject: [AccessD] Query is to complex Access says this query is to complex and of course cannot run it. I need some suggestions on how to do this better. Several queries, VBA? Thanks SELECT [qry Manifold Oil Production last 90 Days].Manifold, [qry Manifold Oil Production last 90 Days].ProductionDate, [qry Manifold Oil Production last 90 Days].Oil1, [qry Manifold Gas Production Last 90 Days].Gas1, [qry Manifold Water Production Last 90 Days].Water1, IIf([Oil1]=0,Null,[Gas1]*1000/[Oil1]) AS GOR1 FROM ([qry Manifold Oil Production last 90 Days] LEFT JOIN [qry Manifold Water Production Last 90 Days] ON ([qry Manifold Oil Production last 90 Days].Manifold = [qry Manifold Water Production Last 90 Days].Manifold) AND ([qry Manifold Oil Production last 90 Days].ProductionDate = [qry Manifold Water Production Last 90 Days].ProductionDate)) LEFT JOIN [qry Manifold Gas Production Last 90 Days] ON ([qry Manifold Oil Production last 90 Days].Manifold = [qry Manifold Gas Production Last 90 Days].Manifold) AND ([qry Manifold Oil Production last 90 Days].ProductionDate = [qry Manifold Gas Production Last 90 Days].[Production Date]) WHERE ((([qry Manifold Oil Production last 90 Days].Manifold)=[Forms]![frm Select Manifold]![ManifoldList]) AND (([qry Manifold Oil Production last 90 Days].ProductionDate) Between [Forms]![frm Time Interval]![StartDate] And [Forms]![frm Time Interval]![EndDate])) GROUP BY [qry Manifold Oil Production last 90 Days].Manifold, [qry Manifold Oil Production last 90 Days].ProductionDate, [qry Manifold Oil Production last 90 Days].Oil1, [qry Manifold Gas Production Last 90 Days].Gas1, [qry Manifold Water Production Last 90 Days].Water1, IIf([Oil1]=0,Null,[Gas1]*1000/[Oil1]); Chester Kaup Engineering Technician Kinder Morgan CO2 Company, LLP Office (432) 688-3797 FAX (432) 688-3799 No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com