sorting contents of a table view

Hello, I have a table view that is pulling data from a sql query that I turn into a list. I am noticing that after 7 entries are made into the database that it is throwing the sort order off when it is brought back into the workflow.

If I look into my database everything is in the correct order. Its just when I pull this list into the table view that it seems to have no order to it.

Is there a way to have it sort on say column_1 when the data is brought in?

If I sort my SQL Select query by adding ‘ORDER BY column_1_field ASC’ for ascending order or 'ORDER BY column_1_field DESC" for descending order, the data retrieved is sorted and displayed properly for my table views. It makes no difference how many records there are.

Can you give me a example of how this would look?

Order by just goes at the end of the select statement:

SELECT first_name, last_name FROM SOME_TABLE WHERE last_name IS NOT NULL ORDER BY last_name

or

SELECT first_name, last_name FROM SOME_TABLE WHERE last_name IS NOT NULL ORDER BY last_name DESC
if you wanted it to be in reverse alphabetical order

Thank You. works great