Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    format query for weeks (Access 2000)

    I want to build a query giving the sales of cartons for a week but i cannot fromat it properly.I want to have the sales per week on the field Invoicedate.In short, i need to know the sum of cartons sold for each week.My question is how can i format the query to
    show the sum of cartons per week.
    I will be very grateful for the help.

    My present query is:

    SELECT products.Productid, Sum([order details].cartons) AS SumOfcartons, orders.invoicedate
    FROM ((customers INNER JOIN orders ON customers.CustomerID = orders.customerid) INNER JOIN [order details] ON orders.OrderID

    = [order details].OrderID) INNER JOIN products ON [order details].ProductID = products.Productid
    GROUP BY products.Productid, orders.invoicedate;

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: format query for weeks (Access 2000)

    Use:
    SELECT products.Productid, Sum([order details].cartons) AS SumOfcartons, Format(orders.invoicedate,"ww")
    FROM ((customers INNER JOIN orders ON customers.CustomerID = orders.customerid) INNER JOIN [order details] ON orders.OrderID

    = [order details].OrderID) INNER JOIN products ON [order details].ProductID = products.Productid
    GROUP BY products.Productid, Format(orders.invoicedate,"ww");
    Francois

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •