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
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