Kaup, Chester
Chester_Kaup at kindermorgan.com
Mon Feb 13 16:54:54 CST 2006
Problem solved. Deleted one of the criteria and reentered it. Query now runs. Go figure. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester Sent: Monday, February 13, 2006 3:35 PM To: accessd at databaseadvisors.com Subject: [AccessD] Make table query fails When I try to run the following query I get a message of invalid argument. When I try to view the results in datasheet view it work fine. What might be going wrong? I tried writing the results to a different table with no success. No I did not write this ugly query - I was given it. Thanks for ideas. SELECT [Funky Ptrn and Wells to Alloc].CO2PAT, [Funky Ptrn and Wells to Alloc].CO2PAT_SDate, [Funky Ptrn and Wells to Alloc].Well_in_CO2PAT, [Funky Ptrn and Wells to Alloc].Well_in_CO2PAT_API, ConfigMaster.PID AS Other_Pattern, Right(ConfigMaster!PID,Len(ConfigMaster!PID)-4) AS Other_Pattern_as_Well, Constants!SDate AS Other_Pattern_SDate, SurfaceMaster.PID AS Other_Pattern_as_Well_API INTO [Funky Temp Other Ptrn to Alloc] FROM SurfaceMaster, [Funky Ptrn and Wells to Alloc] INNER JOIN (ConfigMaster INNER JOIN Constants ON ConfigMaster.PID = Constants.PID) ON [Funky Ptrn and Wells to Alloc].Well_in_CO2PAT_API = ConfigMaster.ChildPID WHERE (((ConfigMaster.PID) Like "PAT*") AND ((Constants.Date)<#1/1/1960#) AND ((SurfaceMaster.Name)=Right([ConfigMaster]![PID],Len([ConfigMaster]![PID ])-4))) ORDER BY [Funky Ptrn and Wells to Alloc].CO2PAT, [Funky Ptrn and Wells to Alloc].Well_in_CO2PAT, Right(ConfigMaster!PID,Len(ConfigMaster!PID)-4); 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