Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2011
    Posts
    7

    How to build query

    Hi,

    I have a table like Access below

    Client TCO_FCO_Case Closed_in_5 Day WTD MTD QTD YTD
    7538 1 1 0 0 1 1 1
    7538 1 5 0 1 0 1 1
    7538 0 1 0 0 1 0 1
    7538 1 0 0 1 1 1 1
    7538 1 7 1 0 1 1 1
    5424 1 8 0 0 1 1 1
    5424 1 0 1 0 0 1 1
    5424 1 8 0 1 1 1 0
    5424 0 8 1 1 1 0 1
    5424 1 6 0 0 1 1 1

    And from above table I want results like below.

    Client Period Sum of Closed_in_5
    7538 Day 7
    7538 WTD 5
    7538 MTD 8
    7538 QTD 13
    7538 YTD 13
    5424 Day 0
    5424 WTD 8


    5424 MTD 22
    5424 QTD 22
    5424 YTD 14

    Criteria for Sum of Closed_in_5 for each client.

    For Day:- Day should be 1 and TCO_FCO_Case should be 1.
    For WTD:- WTD should be 1 and TCO_FCO_Case should be 1.
    For MTD:- MTD should be 1 and TCO_FCO_Case should be 1.
    For QTD:- QTD should be 1 and TCO_FCO_Case should be 1.
    For YTD:- YTD should be 1 and TCO_FCO_Case should be 1.

    I am totally confused, how this result will come.

    Please help.

    Thanks & Regards,
    Kashif.

  2. #2
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Client Period Sum of Closed_in_5
    7538 Day 7
    7538 WTD 5

    How did you get the 7 & the 5?

  3. #3
    Join Date
    Jan 2011
    Posts
    7
    Hi Robeen,

    Thanks for reply,

    from top most table condition,

    For Day:- Day should 1 and TCO_FCO_Case should be 1 then sum column Closed_in_5 Day.
    For WTD:- WTD should 1 and TCO_FCO_Case should be 1 then sum column Closed_in_5 Day.
    and wise versa.

    Thanks,
    Kashif.

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

Similar Threads

  1. Command button-Build Query/Report
    By jnb22019 in forum Programming
    Replies: 6
    Last Post: 07-13-2011, 08:14 AM
  2. Access does not build correct APPEND query
    By lwoods in forum Queries
    Replies: 3
    Last Post: 05-06-2011, 02:19 AM
  3. Access Query build
    By zarfx4 in forum Access
    Replies: 3
    Last Post: 04-08-2010, 09:53 AM
  4. Build Query from cmdButton
    By thart21 in forum Forms
    Replies: 1
    Last Post: 03-12-2010, 09:43 AM
  5. Hellp with Query Build
    By zarfx4 in forum Queries
    Replies: 0
    Last Post: 05-28-2009, 08:21 AM

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