Re: [sqlite] Strange concatenation result

2018-02-25 Thread Gary Briggs
On Mon, Feb 26, 2018 at 12:33:29AM -0500, Igor Tandetnik wrote: > On 2/26/2018 12:23 AM, Gary Briggs wrote: > >Evening > > > >I'm seeing a weird effect when concatenting things: > >WITH q(tape,dp) AS (SELECT '04E', 1) > > SELECT SUBSTR(tape,1,dp-1) || SUBSTR(tape,dp,1)+1 || SUBSTR(tape,dp+1) AS

Re: [sqlite] Strange concatenation result

2018-02-25 Thread Igor Tandetnik
On 2/26/2018 12:23 AM, Gary Briggs wrote: Evening I'm seeing a weird effect when concatenting things: WITH q(tape,dp) AS (SELECT '04E', 1) SELECT SUBSTR(tape,1,dp-1) || SUBSTR(tape,dp,1)+1 || SUBSTR(tape,dp+1) AS expect_14E, || has higher precedence than +. Your expression is an

[sqlite] Strange concatenation result

2018-02-25 Thread Gary Briggs
Evening I'm seeing a weird effect when concatenting things: WITH q(tape,dp) AS (SELECT '04E', 1) SELECT SUBSTR(tape,1,dp-1) || SUBSTR(tape,dp,1)+1 || SUBSTR(tape,dp+1) AS expect_14E, SUBSTR(tape,1,dp-1) AS segment_1, SUBSTR(tape,dp,1)+1 AS segment_2,

Re: [sqlite] Shell CSV bug

2018-02-25 Thread Richard Hipp
On 2/24/18, David Burgess wrote: > Version SQLite 3.22.0 > Linux 3.19.0-32-generic > > The header line when output to file is terminated by \x0a > all other lines are terminated with \x0d\x0a Unable to repro. Do you have a complete test script? -- D. Richard Hipp

[sqlite] Shell CSV bug

2018-02-25 Thread David Burgess
Version SQLite 3.22.0 Linux 3.19.0-32-generic The header line when output to file is terminated by \x0a all other lines are terminated with \x0d\x0a test case - .mode csv .once afile.csv select ... -- David Burgess ___ sqlite-users