SongbookDB wrote:
> 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

You sort them the same way you sort the other records:

SELECT * FROM
(SELECT *
 FROM table1
 WHERE Language != "" COLLATE NOCASE
 ORDER BY Language COLLATE NOCASE)
UNION ALL
SELECT * FROM
(SELECT *
 FROM table1
 WHERE Language = "" COLLATE NOCASE
 ORDER BY Artist COLLATE NOCASE)
LIMIT 100


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

Reply via email to