Android Question Looking for SQL statement...

Cenny

Active Member
Licensed User
I am looking for a sql statement that gives me records where the fieldnames are in alphabetical order

Cenny
 

eurojam

Well-Known Member
Licensed User
I don't think, that you can manage it in one step. First you have to query the fieldnames from your table. There are different sql statements in the different database systems for that, like in sqlite:
B4X:
PRAGMA table_info(mytable);
in the second step you iterate through the result of the first query and build your select statement
 

Cenny

Active Member
Licensed User
I have solved it by extracting the fieldnames from the table, put them in a list, sorted it and used the list to build a new sql select statement.
Works fine.
Thanks for your suggestions.

Cenny
 
Top