Results 1 to 3 of 3
  1. #1
    sdel_nevo is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2013
    Location
    Gloucester, UK
    Posts
    402

    Merge week numbers is this possible?


    Hi Guys

    i have a queury that i am having troble with, the sgl for the query is this

    SELECT DatePart("ww",[unexdata.DueDate]) AS [DATE], UNEXProcess.Process, UNEXAreaCapacity.KGPW, Sum(UNEXProcess.QTYOUTST) AS SumOfQTYOUTST, UNEXData.Completed, UnexPrePlannedCapacityQuery.PreplannedCapacity, UnexPrePlannedCapacityQuery.[Planned Week Number]
    FROM UnexPrePlannedCapacityQuery INNER JOIN ((UNEXProcess INNER JOIN UNEXAreaCapacity ON UNEXProcess.Process = UNEXAreaCapacity.Area) INNER JOIN UNEXData ON UNEXProcess.ID = UNEXData.ID) ON UnexPrePlannedCapacityQuery.Area = UNEXProcess.Process
    GROUP BY DatePart("ww",[unexdata.DueDate]), UNEXProcess.Process, UNEXAreaCapacity.KGPW, UNEXData.Completed, UnexPrePlannedCapacityQuery.PreplannedCapacity, UnexPrePlannedCapacityQuery.[Planned Week Number]
    HAVING (((UNEXProcess.Process)=[forms]![UnexAreas]![location]) AND ((UNEXData.Completed)=False))
    ORDER BY DatePart("ww",[unexdata.DueDate]);

    this returns the sum of all "qty outstanding" were the machine name = "Fully Factored" and also returns the value of the planned capacity by week number for the same machine

    this is what the query returns

    Click image for larger version. 

Name:	Capture.PNG 
Views:	6 
Size:	19.6 KB 
ID:	23472

    What i can't seem to do and to be honest im not sure how to do it is the following.

    i would like to "Planned Week Number" in this case 39 to only show once, so in this case it would appear between date "36" and "40" and the "PlannedCapacity" row would only show "1000" for this entry

    is this even possible?

    I hope this makes sence
    Kind regards

    Steve

  2. #2
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    remove the DATE column from your query - Also be aware that DATE is a reserved word (it is a function that returns today) and using it can create unexpected errors

  3. #3
    sdel_nevo is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2013
    Location
    Gloucester, UK
    Posts
    402
    Hi Ajax

    Many thanks for the heads up

    Kind regards
    Steve

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 9
    Last Post: 06-19-2015, 03:37 PM
  2. week numbers
    By ukmale65000 in forum Access
    Replies: 20
    Last Post: 10-28-2013, 04:34 PM
  3. Converting Dates into week numbers (custom)
    By Bleep-Blop in forum Programming
    Replies: 5
    Last Post: 10-04-2013, 03:29 PM
  4. Replies: 1
    Last Post: 04-27-2012, 09:16 AM
  5. When Week Numbers Collide!
    By Schwagr in forum Queries
    Replies: 3
    Last Post: 03-18-2006, 10:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums