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!

SQL not in order.

Status
Not open for further replies.

TechnicalScott

Technical User
Jan 26, 2005
71
GB
Hello,

I have an SQL database which is read by an access front end. I've been browsing through the records and have discovered that the SQL table isn't in order anymore, it jumps every now and again so I end up with a sequence such as 500, 501, 502, 580, 581, 582, 503, 504

Any ideas how I get it back on track?

Regards

Scott
 
The clustered index will dictate the physical ordering of the data, but you can use ORDER BY to sort your data as you wish. Assuming the sequence you included above is some kind of number type (e.g. int), ORDER BY will place the records in order.

James Goodman MCSE, MCDBA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top