Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 MS SQL Server 2000: Rows get sorted automatically

Author  Topic 

innosol
Starting Member

2 Posts

Posted - 2008-02-06 : 02:57:59
Hi all,

I import MS Excel 2003 spread sheet in MS SQL Server 2000 through MS SQL Server 2000 Enterprise Manager (rightclick on the table to be filled with data\all task\import data). My excel file have 2000 rows and 100 columns of data. All the data are imported in relevant attributes cells in good manner. But the rows are sorted automatically. I am trying to say that first row data is match with my excel file. But second row data have gone to 7th row and 7th row have gone to 5th row like that. I need the data sequence what I have in my excel file. What is the problem occurred? How can I solve this?
Can I export my MS Excel 2003 file to MS SQL Server database?
Please help me. I don't have more knowledge in MS SQL Server 2000.
If your answer has any query to run then please mention where should I run that query.
Thanks,

With Regards,
bala.

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2008-02-06 : 10:17:03
You have to think of the data in that table as being raw data, and worry about the sorting when you issue a SELECT statement, e.g Open QueryAnalyzer and do something like : SELECT myCol1,myCol2 FROM myTable ORDER BY myCol1 .



Jack Vamvas
--------------------
Search IT jobs from multiple sources- http://www.ITjobfeed.com
Go to Top of Page

innosol
Starting Member

2 Posts

Posted - 2008-02-06 : 11:15:16
quote:
Originally posted by jackv

You have to think of the data in that table as being raw data, and worry about the sorting when you issue a SELECT statement, e.g Open QueryAnalyzer and do something like : SELECT myCol1,myCol2 FROM myTable ORDER BY myCol1 .



Jack Vamvas
--------------------
Search IT jobs from multiple sources- http://www.ITjobfeed.com




Sorry Jack I couldn't follow your answer. I can't understand your answer.
Please clarify in detail.
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-02-06 : 23:19:17
If the table has clustered index, sql will order rows by that column. If still don't understand, get help from your dba.
Go to Top of Page
   

- Advertisement -