Not sure how if this is the way to reply, but thank you Igor.

On Sun, Nov 3, 2013 at 3:16 PM, Igor Tandetnik <i...@tandetnik.org> wrote:

> On 11/2/2013 11:24 PM, SongbookDB wrote:
>
>> I'm using the following query to first, display in asc order any records
>> that have something in the language column, then any fields where the
>> language column is an empty string (fyi I don't have nulls in this
>> column).
>> It works perfectly.
>>
>> I'd now like to order the Language = "" rows by another column, "Artist",
>> but cannot crack how to restructure the query to accommodate this.
>>
>> SELECT * FROM
>> (SELECT *
>> FROM table1
>> WHERE Language !="" COLLATE NOCASE
>> ORDER BY Language COLLATE NOCASE)
>> UNION ALL
>> SELECT *
>> FROM table1
>> WHERE Language ="" COLLATE NOCASE
>> LIMIT 100
>>
>
> select * from table1
> order by Language = '', Language collate nocase, Artist collate nocase;
>
> --
> Igor Tandetnik
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



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

Reply via email to