Andrés G. Aragoneses wrote:
> Igor Tandetnik wrote:
>> "Andrés G. Aragoneses" <[EMAIL PROTECTED]>
>> wrote:
>>> Hello, I am querying a list of elements and some of them are blank
>>> (''). However, I want that those who are blank appear as the last
>>> (instead of the first) elements when I sort with ORDER BY
>>> alphabetically. How can I do this with just SQL?
>> ORDER BY text = '', text
> 
> It works thanks! 

Hugh, but this seems not to be applicable for different columns, 
because, let's suppose I have:

ItemId   ItemName   ItemNameSort
1        'Balloon'  'balloon'
2        ''         '[noname]'
3        'Car'      'car'

If I use "ORDER BY ItemName = '', ItemNameLowered" I get 2,1,3 and I 
want to get 1,3,2. Any ideas?

Regards,

        Andres

-- 

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to