How to INSERT INTO values and select...

tonye53

New member
Local time
Today, 03:23
Joined
Apr 21, 2007
Messages
8
My thinking must not be right as I can't get this to work but i have a table with

Date AMT
02/05 50
02/06 20
and soforth....

I am summing up each week and putting this in a table with values

WeekBeginningDate WeekEndingDate SumofAmt

I am trying to do
INSERT INTO tblTwo ("02/05/2007", "02/09/2007", SumOfAmt)
SELECT sum(Amt) FROM tblOne
where TDate >=#02/05/2007# and TDate <= #02/09/2007#

The two dates in the INSERT INTO are just values and the SumOfAmt is from the select. Can someone help me with this? Thanks in Advance!!
 
Last edited:
In the INSERT INTO clause, you want to list the field names in the destination table. The actual values to be supplied would be in the SELECT clause.
 
Thanks Pbaldy -- I had been working much too long yesterday, thank you for your help !!
 

Users who are viewing this thread

Back
Top Bottom