Re: [sqlite] Second ORDER BY statement

2013-11-04 Thread SongbookDB
Ah - thanks Clemens - that worked REALLY well! On Sun, Nov 3, 2013 at 10:22 PM, Clemens Ladisch wrote: > 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 * FR

Re: [sqlite] Second ORDER BY statement

2013-11-04 Thread SongbookDB
Thanks Simon I'm yet to get to setting up a new table with COLLATE NOCASE columns and copy the old table's data into it. On Sun, Nov 3, 2013 at 11:01 PM, Simon Slavin wrote: > > On 3 Nov 2013, at 3:24am, SongbookDB wrote: > > > WHERE Language !="" COLLATE NOCASE > > ORDER BY Language COLLATE

Re: [sqlite] Second ORDER BY statement

2013-11-03 Thread Simon Slavin
On 3 Nov 2013, at 3:24am, SongbookDB wrote: > WHERE Language !="" COLLATE NOCASE > ORDER BY Language COLLATE NOCASE) By the way, if every time you refer to your Language column you want it colated NOCASE, it's far more efficient to do it when you define the column in the table. CREATE TABLE

Re: [sqlite] Second ORDER BY statement

2013-11-03 Thread Clemens Ladisch
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 > SELEC

Re: [sqlite] Second ORDER BY statement

2013-11-02 Thread SongbookDB
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 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 fi

Re: [sqlite] Second ORDER BY statement

2013-11-02 Thread Igor Tandetnik
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

[sqlite] Second ORDER BY statement

2013-11-02 Thread SongbookDB
Hi 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