Results 1 to 2 of 2

Thread: (URGENT)restricting the no. of records resulted from a select Query

  1. #1
    ashish Guest

    (URGENT)restricting the no. of records resulted from a select Query


    dear friend,


    i run a sql command like this
    select * from table_name
    what i want is that if no. of records found are greater then 500 than it should stop the query and only show those 500 records dont go further and stop the process
    waiting for reply
    ashish bhatnagar

  2. #2
    Kennet Wilhelmsson Guest

    (URGENT)restricting the no. of records resulted from a select Query (reply)

    SET ROWCOUNT 500
    GO
    select * from table_name
    GO

    SET ROWCOUNT 0 -- resets to unlimited rows again
    GO

    /Kenneth
    ------------
    ashish at 6/3/99 1:35:01 AM


    dear friend,


    i run a sql command like this
    select * from table_name
    what i want is that if no. of records found are greater then 500 than it should stop the query and only show those 500 records dont go further and stop the process
    waiting for reply
    ashish bhatnagar

Posting Permissions

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