Results 1 to 2 of 2

Thread: how this query can be done in access...

  1. #1
    Join Date
    Apr 2010
    Posts
    1

    how this query can be done in access...

    if I have a table of data like this in access :
    MEMBER_ID ENROLLMENT_DATE DISENROLL_DATE Days
    40000541 7/1/2007 5/31/2008 336
    40000541 7/1/2008 7/31/2008 31

    40001315 7/1/2007 10/31/2007 123
    40001315 11/1/2007 6/30/2008 243


    40001353 2/1/2007 2/28/2007 28
    40001353 3/1/2007 12/31/2008 672
    40001387 7/1/2007 5/31/2008 336
    40001387 7/1/2008 7/31/2008 31

    40004914 12/1/2007 1/31/2008 62
    40004914 2/1/2008 3/31/2008 60


    How can I write a query in access that can combine the Member ID who have the second enrollment date is continuous followed the disenrolled_date (highlight in red), so that I can have only record for those members. Please help. Greatly appreciated.
    Attached Files Attached Files

  2. #2
    Join Date
    Aug 2008
    Posts
    29

    Lightbulb Access query

    See if this is of any help....
    Code:
    SELECT *
    FROM YOURTABLE AS a
    WHERE (((Exists (SELECT 1 FROM YOURTABLE b 
                         WHERE b.MEMBER_ID = a.MEMBER_ID
          ))=False));

Posting Permissions

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