#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    101
    Rep Power
    12

    Select only 1 iteam


    Hi!

    In mySQL there is this function asc limit 1 which will sort the sql select statement and return only 1 result.

    When I do this, it says SQL Command not properly ended. Any suggestion? Thank you.

    Code:
    SELECT myDate order by myDate asc limit 1
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2003
    Location
    Paris Uppland
    Posts
    2,385
    Rep Power
    391
    Code:
    SELECT myDate from (select myDate from t 
    order by myDate asc )
    where rownum = 1
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    101
    Rep Power
    12
    Thank you.

IMN logo majestic logo threadwatch logo seochat tools logo