sort transformation in ssis
A small addition: if you really want to view the data sorted, just add an ORDER BY clause at the end of your SELECT statement.MCTS, MCITP - Please mark posts as answered where appropriate.
May 23rd, 2012 2:17am

hi, i am loading csv file file into table. i am using script componant which generate sequence number for each row , like 1,2,3,4... but when data loaded into table it is not sorted like 2,4,3,1... how to sort data when loading into table
Free Windows Admin Tool Kit Click here and download it now
May 27th, 2012 1:56am

SQL Server does not garantuee a physical order in your tables. To be honest, it's not even necessary: it's a relational database, in other words, the tables are relations, meaning there's is no concept of order. The only way ordering can be necessary is for presentation purposes. If you really want the data to be sorted, try creating an IDENTITY column on your table (you won't need the script component anymore) and create a clustered primary key on that. (even this won't always 100% garantuee you the correct sorting order, but it usually does)MCTS, MCITP - Please mark posts as answered where appropriate.
May 27th, 2012 2:18am

A small addition: if you really want to view the data sorted, just add an ORDER BY clause at the end of your SELECT statement.MCTS, MCITP - Please mark posts as answered where appropriate.
Free Windows Admin Tool Kit Click here and download it now
May 27th, 2012 2:20am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics