[AccessD] Query is to complex

Kaup, Chester Chester_Kaup at kindermorgan.com
Mon Sep 17 08:10:54 CDT 2007


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.





More information about the AccessD mailing list