C
CoachBarkerOJPW
Problem
I am trying to create a query from two unrelated tables, I have
tblSales tblSalesTax
SaleID SalesTaxID
DateOfSale WeekBeginning
TaxAmount WeekEnding
SubTotal AmountOwed
TotalSale
From tblSale I run this Query to get the quarterly amount of Sales Tax (this
is a dynamic query in a data acces class in VB.NET where the variables are
(dateofsale, beginning date,endingDate) ;
SELECT Sum([TotalSale])-Sum([SubTotal]) AS QuarterSalesTax
FROM tblSale
WHERE (((tblSale.DateOfSale) Between #01/1/2006# And #03/31/2006#));
This query works for me to get the amount of Sales Tax for each Quarter.
What I would like to do is assign from tblSale to tblSalesTax
DateOfSale = weekBeginning
DateOfSale = weekEnding
QuarterSalesTax = AmountOwed
Is this possoble or am I trying to do something that can not be done?
Or is it possible when the DateOfSale, SubTotal and TotalSale are added to
tblSale that they can also be added to tblSalesTax as weekBegining,
weekEnding, SubTotal and TotalSale and then do the calculation for
QuarterSalesTax from there?
Thank you
CoachBarkerOJPW
I am trying to create a query from two unrelated tables, I have
tblSales tblSalesTax
SaleID SalesTaxID
DateOfSale WeekBeginning
TaxAmount WeekEnding
SubTotal AmountOwed
TotalSale
From tblSale I run this Query to get the quarterly amount of Sales Tax (this
is a dynamic query in a data acces class in VB.NET where the variables are
(dateofsale, beginning date,endingDate) ;
SELECT Sum([TotalSale])-Sum([SubTotal]) AS QuarterSalesTax
FROM tblSale
WHERE (((tblSale.DateOfSale) Between #01/1/2006# And #03/31/2006#));
This query works for me to get the amount of Sales Tax for each Quarter.
What I would like to do is assign from tblSale to tblSalesTax
DateOfSale = weekBeginning
DateOfSale = weekEnding
QuarterSalesTax = AmountOwed
Is this possoble or am I trying to do something that can not be done?
Or is it possible when the DateOfSale, SubTotal and TotalSale are added to
tblSale that they can also be added to tblSalesTax as weekBegining,
weekEnding, SubTotal and TotalSale and then do the calculation for
QuarterSalesTax from there?
Thank you
CoachBarkerOJPW