row_number in SQL 2000

10 pts.
Tags:
Microsoft SQL Server 2000
ROW_NUMBER
SQL Query
How do I find out the row_number in SQL 2000 like using row_number() function in SQL 2005?

Answer Wiki

Thanks. We'll let you know when a new response is added.

Well I would prefer adding a simple running counter using PHP (or whatever you’re using) on demand but it is also possible to go at it like this, kb186133, I guess…

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • msi77
    1,670 pointsBadges:
    report
  • Brijesh
    Hi

    This is sample code whcih you may get some idea on row

    CREATE TABLE #temp (
      Serial int IDENTITY(1,1)
    , Name varchar(50)
    , Phone varchar(50)
    , Fax varchar(50)
    );

    INSERT INTO #temp (Name, Phone, Fax)
    SELECT Name, Phone, Fax
    FROM table1 WHERE [condition]
    ORDER BY Name;

    SELECT * FROM #temp;
     
    DROP TABLE #temp; 
    9,780 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following