This topic is locked
[SOLVED]

Order varchar

11/11/2022 9:25:39 AM
PHPRunner General questions
J
Juan author

Hi to all this Is my first topic and want greet everyone and thank you for your help.
I have a database field of type, varchar with postgrees database.
I would like to sort the field as follows :

67
67 A
67 B
68
69
...
100
101 A
101 B
101 C
etc..

How can I automatically sort in order of number and letter added and sort them in numerical order and the letter I add to it ?
I have tried to sort in the phprunner wizard in Ascending and Descending order but the result in a text field does not give the expected results.
Thanks for any help,

John

fhumanes 11/11/2022

Hello Juan,

I think the simplest thing is to use a new "dummy1" column with the result of applying the function of concat "concat" with the fields you need and in the SQL statement indicate the ordination by that column "dummy1".

Cheers,
fernando

J
Juan author 11/11/2022

Hi Fernando, thanks very much for your time.
Ok, I test your recomendation.

Cheers,
juan