Wednesday, July 18, 2018

#1 2010-03-31 04:39:38 pm

petekin74
Member
Registered: 2005-07-06
Posts: 137

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?

Offline

 

#2 2010-04-09 12:10:33 pm

jwseaf
Member
Registered: 2009-05-16
Posts: 6

Re: sorting contents of a table view

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.

Offline

 

#3 2010-08-27 01:59:10 pm

petekin74
Member
Registered: 2005-07-06
Posts: 137

Re: sorting contents of a table view

jwseaf wrote:

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?

Offline

 

#4 2010-09-17 11:27:45 am

Matt-Boy
Member
Registered: 2005-10-21
Posts: 480

Re: sorting contents of a table view

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

Offline

 

#5 2010-09-21 06:18:07 pm

petekin74
Member
Registered: 2005-07-06
Posts: 137

Re: sorting contents of a table view

Thank You. works great

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)