Groups | Blog | Home
all groups > sql server dts > february 2007 >

sql server dts : Insert Ordering


Joe
2/5/2007 1:20:28 PM
If I execute the following command in a DTS package will the rows be
inserted in that order?



SELECT *

INTO TableB

FROM TableA

ORDER BY COL3, COL2, COL5



And when I perform the following select statement would they still be sorted
in that order?



SELECT *

FROM TableB





I say that they will not necessarily be in the same order but a coworker
disagrees and I can't seem to find the answer anywhere

Allan Mitchell
2/5/2007 7:22:37 PM
Without an ORDER BY clause on the SELECT statement you cannot guarantee
return order.

--


Allan Mitchell
http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com |
http://www.konesans.com



[quoted text, click to view]
AddThis Social Bookmark Button