Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert data based on a previous query

Status
Not open for further replies.

que4life

Programmer
Feb 15, 2005
7
US
I have a query that works fine...What I want to after the query is insert the Sum(LoungeTotalSales) Into another table. Below is the query that works fine...

SELECT Sum(LoungeTotalSales) AS SumOfL_Total
FROM LoungeSalesSummary
WHERE (((LoungeSalesSummary.L_Date) Between [@BegCalDate] And [@EndCalDate]));

Thanks for any help...
 
INSERT INTO AnotherTable (AnotherField)
SELECT Sum(LoungeTotalSales) AS SumOfL_Total
FROM LoungeSalesSummary
WHERE L_Date Between [@BegCalDate] And [@EndCalDate];

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Not that it really matters, I'm just curious, but do you have a valid reason for breaking normalization rules?


Leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top