Results 1 to 4 of 4

Thread: [RESOLVED] database in ms access

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Location
    /root/usr/local/bin
    Posts
    476

    Resolved [RESOLVED] database in ms access

    hello!
    i have these values in access database using vb6

    field1 field2
    a 05/06/2007
    a 05/09/2007
    b 05/11/2007
    b 05/20/2007

    i want output like thisgetting the max date and distinct)
    a 05/09/2007
    b 05/20/2007

    i tried DISTINCT and MAX(field2) unfortunately it doesn't work

    pls help me to solve.
    tnx

  2. #2
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: database in ms access

    Code:
    SELECT Field1, Max(Field2)
    FROM YourTable
    GROUP BY Field1

  3. #3
    Addicted Member cxj98's Avatar
    Join Date
    Feb 2007
    Posts
    170

    Re: database in ms access

    What do you want it do???

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Location
    /root/usr/local/bin
    Posts
    476

    Re: database in ms access

    TNX! bushmobile!

    the only keyword there is GROUP BY
    tnx again.

Posting Permissions

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



Click Here to Expand Forum to Full Width