[AccessD] Append query question

Stuart McLachlan stuart at lexacorp.com.pg
Wed May 4 13:24:15 CDT 2005


On 4 May 2005 at 10:50, Kaup, Chester wrote:

> 
> INSERT INTO [tbl Cum Oil Test] ( [Well Name], [Date], [Cum Oil] )
> 
> SELECT [tbl Monthly Oil Test].[Well Name], Max([tbl Monthly Oil
> Test].Date), [tbl Cum Oil Test]![Cum Oil]+[tbl Monthly Oil Test]![Prod
> Oil] AS [New Cum]
> 
> FROM [tbl Monthly Oil Test], [tbl Cum Oil Test]
> 
> WHERE ((([tbl Monthly Oil Test]![Well Name])=[tbl Cum Oil Test]![Well
> Name]));
> 
> -- 

Add

GROUP BY [tbl Monthly Oil test].[Well Name]

and as JC said, get rid of the spaces and don't use Date or any other 
reserved word as a field name. These practices *will* bite you sooner or 
later.



-- 
Stuart





More information about the AccessD mailing list