You could also write it even more clearly as:
WITH IndexedLines AS (SELECT LineText FROM DocLines WHERE DocID = 10 ORDER
BY LineIndex)
SELECT group_concat(LineText, char(10)) FROM IndexedLines;
That code will actually work. As it is not C, SQLite will not recognize
the '\n' C escaped line feed
On 10/4/17, sub sk79 wrote:
> On Wed, Oct 4, 2017 at 12:29 PM, Richard Hipp wrote:
>
>>
>> This restriction on the query flattener causes your example
>> query above to do what you want.
>>
>
> If subquery-flattening needs to be disabled explicitly, is using
On Wed, Oct 4, 2017 at 12:29 PM, Richard Hipp wrote:
>
> This restriction on the query flattener causes your example
> query above to do what you want.
>
If subquery-flattening needs to be disabled explicitly, is using "LIMIT -1
OFFSET 0 " the recommended way?
> SQLite
On 10/4/17, Doug Nebeker wrote:
> Is it just a matter of using sqlite3_create_function to register a function
> that guarantees it will concatenate in the order rows are received? Would
> that guarantee that your example works, or is order no longer guaranteed
> once they
On 4 Oct 2017, at 4:06pm, Doug Nebeker wrote:
> Is it just a matter of using sqlite3_create_function to register a function
> that guarantees it will concatenate in the order rows are received? Would
> that guarantee that your example works, or is order no longer
Is it just a matter of using sqlite3_create_function to register a function
that guarantees it will concatenate in the order rows are received? Would that
guarantee that your example works, or is order no longer guaranteed once they
leave the inner select?
SELECT group_concat(LineText, '\n')
On 04/10/2017 02:16, Simon Slavin wrote:
The differences between SQLite and (a.o.) MySQL versions of
"group_concat" are a recurrent topic.
Since I often need to specify "distinct", "order by", "order direction"
and "separator", I have written a simple UDF class that simulates the
MySQL full
On 3 Oct 2017, at 11:13pm, Doug Nebeker wrote:
> How can I select a document and get the complete sorted text back in a single
> row (so I can do a JOIN on a different table with additional information)?
There is a way which will probably work but the documentation
8 matches
Mail list logo