• bosekolli (2/23/2008)


    my name is BABU i have requirement like this any body can help me?

    i have a table name emp with 10000 records and without identity column i want first 5000 records after i want 5000 to 7000 records later 7000 to 10000 is it possible in sql server?

    The answer to both questions is "Yes". Like Ian stated, though, we need just a wee bit more info... Are you in fact using SQL Server 2000 or 2005? Can you post the CREATE statement for the EMP table? In the absense of an IDENTITY column, what is the Primary Key of the table? And, last but not least, what order to you want the results to be sorted by?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)