How to code as Access first function?

  • In Access, I used First function as below to make data from 1) to 2) as below query:

    SELECT ID, DATEFROM,

    First(duration) AS duration, First(DATETO) AS DATETO,

    First(ORDERID) AS ORDERID

    FROM TABLE1

    GROUP BY MEMBID, DATEFROM

    How to code in SQL to make result as 2)?

    1)

    ID---------DATEFROM--DURATION-DATETO---------ORDERID

    06000031--2009-07-22------13---2009-08-06------226209

    06000031--2009-07-22------20---2009-08-13------640173

    06000031--2010-04-09------4----2010-04-15------226209

    2)

    ID---------DATEFROM--DURATION-DATETO---------ORDERID

    06000031--2009-07-22------13---2009-08-06------226209

    06000031--2010-04-09------4----2010-04-15------226209

  • Please don't start a new thread if you have additional information to a question already posted.

    Original post including a first reply can be [url=found http://www.sqlservercentral.com/Forums/FindPost1065768.aspx%5Dhere%5B/url%5D%5B/b%5D



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply