# Loading multiple csv file record and maintain order by one of the column

**URL:** <https://forum.kx.com/t/loading-multiple-csv-file-record-and-maintain-order-by-one-of-the-column/6739>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [October 6, 2010, 3:02pm UTC](https://forum.kx.com/t/loading-multiple-csv-file-record-and-maintain-order-by-one-of-the-column/6739 "2010-10-06T15:02:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![koonchai](https://avatars.discourse-cdn.com/v4/letter/k/0ea827/32.png) [@koonchai](https://forum.kx.com/u/koonchai)\
**Post date:** [October 6, 2010, 3:02pm UTC](https://forum.kx.com/t/loading-multiple-csv-file-record-and-maintain-order-by-one-of-the-column/6739/1 "2010-10-06T15:02:00Z")

</div>

Hi,I have written q script to load all csv files in a directory into atableand also will like to sort the loading by a particular columnNot sure how can I sort it? I using update command to insert to atable.Thanks

---

<div class="post-metadata">

**Author:** ![hlivni](https://avatars.discourse-cdn.com/v4/letter/h/f4b2a3/32.png) [@hlivni](https://forum.kx.com/u/hlivni)\
**Post date:** [October 7, 2010, 2:38pm UTC](https://forum.kx.com/t/loading-multiple-csv-file-record-and-maintain-order-by-one-of-the-column/6739/2 "2010-10-07T14:38:00Z")

</div>

Once you’ve loaded all the csv files into a table, you can use thexasc/xdesc functions to sorthttps://code.kx.com/trac/wiki/Reference/xascI’m not sure if your situation is more complicated than that… If so,a more specific description would help.HagaiOn Oct 6, 9:02?am, “[koonc...@yahoo.com](mailto:koonc...@yahoo.com)” \<koonc…\> wrote:\> Hi,\>\> I have written q script to load all csv files in a directory into a\> table\> and also will like to sort the loading by a particular column\>\> Not sure how can I sort it? I using update command to insert to a\> table.\>\> Thanks\</koonc…\>
