Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Underlying Row ID

Status
Not open for further replies.

culshaja

Programmer
Aug 10, 1999
705
GB
Hi,

I have recently inherited a database that I am modifying to improve performance. To do this I need to add indexes, and I need to a a clustered key to a name field for ordering the reulsts sets in a query by. The only problem with this is that part of the application returns a query that is ordered by the way the data was entered into the table. The way they do this is to use a normal query with no order by. This works at the moment because there is no clustered index. There is no field that is timestamped or autogenerated to allow me to order by and so I was wondering if there was anyway to get access to any underlying SQL Server row id that is ordered by the order the rows are entered?

James :) James Culshaw
jculshaw@active-data-solutions.co.uk
 
at any time in the past, when i added an identity column, i had a notion that an underlying identity had already been present.
- So just add an identity column and order by that, so You will get the records in the order they were entered.

PFR
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top