Results 1 to 3 of 3

Thread: Select first

  1. #1
    Join Date
    Dec 2003
    Location
    Southern California
    Posts
    2

    Unanswered: Select first

    Hello,

    I am working on migrating customer's MS access database to
    SQL Server, but I don't know much about those two.
    I have many problems to migrate access queries to SQL Server.
    There's a question about "Select first" sentence like below.

    SELECT ITEM_NAME, CUSTOMER, First(MATERIAL_CO) AS MATERIAL_CO
    FROM ORDER
    GROUP BY ITEM_NAME, CUSTOMER

    This sentence has no "order by" clause and MATERIAL_CO is not
    with an index. What kind of MATERIAL_CO data is fetched when
    this sentence is done?
    I don't understand much of "first" function of access, but in this
    case it seems to be no need of "first" function for me.

    Thanks,

    dazs

  2. #2
    Join Date
    Dec 2003
    Location
    WA, USA
    Posts
    51

    Re: Select first

    dasz,
    That statement will return the first record for the MATERIAL_CO field.
    same as Move First
    Bob

  3. #3
    Join Date
    Dec 2003
    Location
    Southern California
    Posts
    2

    Re: Select first

    Thanks Bob,

    Does that mean that I can get the first record the system found?
    Not sorted or orderd?

    dasz

Posting Permissions

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