[sqlite] Ordering of group_concat values using subselect in 3.8.7

2014-10-28 Thread James Earl
Hi, After upgrading from SQLite 3.8.6 to 3.8.7, I am no longer able to order group_concat values by using a subselect. For example the following query with 3.8.6 will give me an ordered string of items.image values based on items.position (which contains integers): SELECT products.name,

Re: [sqlite] Ordering of group_concat values using subselect in 3.8.7

2014-10-28 Thread Simon Slavin
On 28 Oct 2014, at 7:33pm, James Earl ja...@truckhardware.ca wrote: After upgrading from SQLite 3.8.6 to 3.8.7, I am no longer able to order group_concat values by using a subselect. Sorry, but as the documentation says https://www.sqlite.org/lang_aggfunc.html The order of the concatenated

Re: [sqlite] Ordering of group_concat values using subselect in 3.8.7

2014-10-28 Thread Nico Williams
On Tue, Oct 28, 2014 at 2:33 PM, James Earl ja...@truckhardware.ca wrote: After upgrading from SQLite 3.8.6 to 3.8.7, I am no longer able to order group_concat values by using a subselect. For example the following query with 3.8.6 will give me an ordered string of items.image values based on

Re: [sqlite] Ordering of group_concat values using subselect in 3.8.7

2014-10-28 Thread James Earl
On Tue, Oct 28, 2014 at 1:43 PM, Simon Slavin slav...@bigfraud.org wrote: On 28 Oct 2014, at 7:33pm, James Earl ja...@truckhardware.ca wrote: After upgrading from SQLite 3.8.6 to 3.8.7, I am no longer able to order group_concat values by using a subselect. Sorry, but as the documentation

Re: [sqlite] Ordering of group_concat values using subselect in 3.8.7

2014-10-28 Thread Clemens Ladisch
James Earl wrote: After upgrading from SQLite 3.8.6 to 3.8.7, I am no longer able to order group_concat values by using a subselect. For example the following query with 3.8.6 will give me an ordered string of items.image values based on items.position (which contains integers): SELECT

Re: [sqlite] Ordering of group_concat values using subselect in 3.8.7

2014-10-28 Thread James Earl
On Tue, Oct 28, 2014 at 1:50 PM, Clemens Ladisch clem...@ladisch.de wrote: Joining typically involves reordering rows. You were lucky in 3.8.6. You have to order the result of the join before grouping: SELECT product_name, GROUP_CONCAT(item_image) AS item_images FROM (SELECT