all groups > sql server dts > march 2007 >
You're in the

sql server dts

group:

Order by


Order by Ant
3/6/2007 1:25:21 AM
sql server dts:
Hi,

I am a complete Newbie to DTS, & while I'm currently educating myself with
books, there are questions which I cannot find in any. Yet.

I recently exported a table to an excel file using the wizard. It created an
SQL script which included an ORDER BY clause, though I needed to delete the
clause as some of the cols were ntext.

Firstly, why did it add an ODER BY clause? Won't it export into the file in
the same order that it appears in the table?

Secondly, what are the implications of removing the ORDER BY clause?

Thanks very much for any ideas on this

Ant





Re: Order by EMartinez
3/6/2007 4:37:44 AM
[quoted text, click to view]


If you're using SQL Server 2000, I'm guessing that the order by is a
default to try and keep the indexing intact for the export (if there
is indexing or primary keys). The order by should not matter once the
export has been done to Excel since you can resort columns in Excel
anyway. Hope this is helpful.

Regards,

Enrique Martinez
Sr. SQL Server Developer
AddThis Social Bookmark Button