Results 1 to 5 of 5
  1. #1
    dr_shiva29 is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    3

    Query help please

    Hi,



    I have 2 columns in my table from which I want particular information:

    Column 1- Date "my company" received document
    Column 2- Date "my company" processed the document

    Could someone help me build a query on the number of documents which were received and processed on the same date?

    Would be grateful ever so much.

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Select *

    from table

    where [date1] = [date2]

  3. #3
    dr_shiva29 is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    3
    Thanks. The suggestions seems to have worked but I have walked into another block now. Now I am able to pick out the records where the "received date" and "processed date" are the same. But this also gives me redundant information, for example, if there were 3 documents which were received and processed on 1st April, I am getting 3 rows with 1st April in both columns.

    What my query should present is one column as "Receipt Date" and another column with total number of documents. Taking the above example, the query should return me a result like below:


    1-Apr-10 3
    2-Apr-10 2


    Once the above is done, is there a possibility to retrieve the data for a date range from this query?

    As always, many thanks in advance for your help. I am really running short on my timeline to complete the database and hope this issue resolves. Just for information, I do not have knowledge of VBA and have built the database completely with the help of tools in MS Access. (

  4. #4
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    please try aggregative query .

  5. #5
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by dr_shiva29 View Post
    Thanks. The suggestions seems to have worked but I have walked into another block now. Now I am able to pick out the records where the "received date" and "processed date" are the same. But this also gives me redundant information, for example, if there were 3 documents which were received and processed on 1st April, I am getting 3 rows with 1st April in both columns.

    What my query should present is one column as "Receipt Date" and another column with total number of documents. Taking the above example, the query should return me a result like below:


    1-Apr-10 3
    2-Apr-10 2


    Once the above is done, is there a possibility to retrieve the data for a date range from this query?

    As always, many thanks in advance for your help. I am really running short on my timeline to complete the database and hope this issue resolves. Just for information, I do not have knowledge of VBA and have built the database completely with the help of tools in MS Access. (
    Shiva,

    Read up on query types. You need grouping to do the next thing. E.G. -
    Code:
    SELECT [DATE1], COUNT(DATE2) AS NumDocsReceived
    
    FROM TABLE
    
    GROUP BY [DATE1]
    A FAQ on this can be found here also: http://www.access-programmers.co.uk/...ighlight=GROUP

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

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