Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Location
    Hyderabad
    Posts
    7

    Question Unanswered: First n records from a query

    Hi,

    I want to retrive first n records of a query first and next n records later. Can I do that? And how? Pls gimme the syntax


    Regards
    Vinaya

  2. #2
    Join Date
    Sep 2003
    Location
    The extremely Royal borough of Kensington, London
    Posts
    778
    select *
    from (select columns, RANK() OVER (ORDER BY orderCOLUMN) As POS from table) V
    where POS between START_POS AND END_POS;
    Bessie Braddock: Winston, you are drunk!
    Churchill: And Madam, you are ugly. And tomorrow, I'll be sober, and you will still be ugly.

Posting Permissions

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