>I tried the following command
>
>db=> SELECT DISTINCT name, city FROM table ORDER BY trim(table.name);
>ERROR: For SELECT DISTINCT, ORDER BY expressions must appear in target
list
Try:
SELECT DISTINCT trim(name) AS name,city FROM table ORDER BY name ;
And if that doesn't work:
SELECT DISTINCT trim(name),city FROM table ORDER BY trim(name) ;