SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: Sql Help

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2008
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Sql Help

    What would be the ODBC(MS-ACCESS) equivalent of the following MYSQL statement?

    "SELECT * FROM TABLE LIMIT 10, 19 ";

    Please Help...I would really apprecaite it.

    Thanks,
    -Parash-

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2005
    Posts
    1,191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can use TOP instead of LIMIT, but not with an offset as far as I am aware.

  3. #3
    SitePoint Enthusiast
    Join Date
    Apr 2008
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks....could you please tell me how to get rid of the offset problem....I want the offset for the pagination purpose...I know there must some way to tackle this issue...I would really appreciate if you could provide me with some logic..

    Thanks in advance

  4. #4
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,247
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    using TOP or LIMIT without an ORDER BY clause makes no sense
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  5. #5
    Non-Member
    Join Date
    Mar 2010
    Location
    UK
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi, I need some help with SQL and date fields.
    What format should I use to query a date/hour field? say I want all records where the date is after a given date.
    Is there any way to access the current day? maybe using VBscript
    Can I subtract two dates?

    Thanks,

    Pablo

  6. #6
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,247
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by Dordhs View Post
    What format should I use to query a date/hour field?
    DATETIME

    Quote Originally Posted by Dordhs View Post
    Is there any way to access the current day?
    yes, the special CURRENT_DATE keyword

    Quote Originally Posted by Dordhs View Post
    Can I subtract two dates?
    yes, with a datetime function, which varies from one database system to another, e.g. DATEDIFF -- consult your manual
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


Tags for this Thread

Bookmarks

Posting Permissions

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