Re: [sqlite] Odd question

2017-12-19 Thread Nelson, Erik - 2
Mark Sent: Tuesday, December 19, 2017 1:32 AM On Mon Dec 18, 2017 at 04:48:27PM +, Nelson, Erik - 2 wrote: > Nomad Sent: Sunday, December 17, 2017 4:11 PM > >On Sat Dec 16, 2017 at 07:53:22PM +, Nelson, Erik - 2 wrote: > > >> Select 1 as value from (insert into table1 values(a, b, c))

Re: [sqlite] Odd question

2017-12-18 Thread nomad
On Mon Dec 18, 2017 at 04:48:27PM +, Nelson, Erik - 2 wrote: > Nomad Sent: Sunday, December 17, 2017 4:11 PM > >On Sat Dec 16, 2017 at 07:53:22PM +, Nelson, Erik - 2 wrote: > > >> Select 1 as value from (insert into table1 values(a, b, c)) I've > >> tried a number of options but haven't

Re: [sqlite] Odd question

2017-12-18 Thread Nelson, Erik - 2
Keith Medcalf Sent: Monday, December 18, 2017 2:31 PM ...snipped a lot... >>Right, all of the statements are step'd regardless of the result of >>sqlite3_column_count(). SQLITE_DONE is returned from the first >>step() for insert queries. >>In pseudocode, it's >>prepare("insert...") //okay

Re: [sqlite] Odd question

2017-12-18 Thread Keith Medcalf
On Monday, 18 December, 2017 11:35 >Keith Medcalf Sent: Monday, December 18, 2017 1:07 PM >To: SQLite mailing list <sqlite-users@mailinglists.sqlite.org> >Subject: Re: [sqlite] Odd question >>>I investigated a further while exploring some of the list >>>suggesti

Re: [sqlite] Odd question

2017-12-18 Thread Nelson, Erik - 2
Keith Medcalf Sent: Monday, December 18, 2017 1:07 PM To: SQLite mailing list <sqlite-users@mailinglists.sqlite.org> Subject: Re: [sqlite] Odd question >>I investigated a further while exploring some of the list >>suggestions. The app halts with an error unless >>sq

Re: [sqlite] Odd question

2017-12-18 Thread Nelson, Erik - 2
Kees Nuyt Sent: Monday, December 18, 2017 12:51 PM On Sat, 16 Dec 2017 21:43:44 +, "Nelson, Erik - 2" wrote: >> I'm using an application that I can't change. >> I can give it multiple queries to run but the >> application assumes that each query will

Re: [sqlite] Odd question

2017-12-18 Thread Nelson, Erik - 2
Keith Medcalf Sent: Sunday, December 17, 2017 4:30 PM >How do you know the insert is not working? Have you verified that the data is >not being inserted or are you simply relying on a popup provided by the >application? If the later, you should be aware that the application can >pop-up

Re: [sqlite] Odd question

2017-12-18 Thread Kees Nuyt
On Sat, 16 Dec 2017 21:43:44 +, "Nelson, Erik - 2" wrote: > I'm using an application that I can't change. > I can give it multiple queries to run but the > application assumes that each query will produce > at least one row and causes an error if that's >

Re: [sqlite] Odd question

2017-12-18 Thread Nelson, Erik - 2
Peter Da Silva Sent: Monday, December 18, 2017 12:24 PM >What I don’t understand is this app that’s making SQLite calls, so it’s using >the SQLite library, and it’s expecting a result from updates and inserts? Yes, exactly. The app designers assumed that rows are returned from every

Re: [sqlite] Odd question

2017-12-18 Thread Peter Da Silva
What I don’t understand is this app that’s making SQLite calls, so it’s using the SQLite library, and it’s expecting a result from updates and inserts? That seems like a bug or design flaw in the application. Possibly it’s looking for the number of rows effected result and not finding it for

Re: [sqlite] Odd question

2017-12-18 Thread Nelson, Erik - 2
Nomad Sent: Sunday, December 17, 2017 4:11 PM >On Sat Dec 16, 2017 at 07:53:22PM +, Nelson, Erik - 2 wrote: >> For unfortunate reasons, I need a query that does an insert and also >> returns at least one row... for example, something along the lines of >> Select 1 as value from (insert into

Re: [sqlite] Odd question

2017-12-18 Thread Nelson, Erik - 2
Nelson, Erik - 2 Sent: Saturday, December 16, 2017 5:27 PM >Petern wrote on Saturday, December 16, 2017 4:53 PM >>Re: Nelson "odd". This will make the desired (?) side effect happen: >>.load eval.so >>SELECT coalesce(eval('INSERT INTO table1 VALUES(a, b, c)'), 1) AS value; >>If INSERT

Re: [sqlite] Odd question

2017-12-17 Thread Keith Medcalf
Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Nelson, Erik - 2 >Sent: Saturday, 16 December, 2017 14:44 >To: SQLite mailing list >Subject: Re: [sqlite] Odd question > >Keith Medcalf wrote on Sent: Saturday, December 16, 2017 4:04

Re: [sqlite] Odd question

2017-12-17 Thread nomad
On Sat Dec 16, 2017 at 07:53:22PM +, Nelson, Erik - 2 wrote: > For unfortunate reasons, I need a query that does an insert and also > returns at least one row... for example, something along the lines of > > Select 1 as value from (insert into table1 values(a, b, c)) > > Or > > Select

Re: [sqlite] Odd question

2017-12-16 Thread Nelson, Erik - 2
Simon Slavin wrote on Saturday, December 16, 2017 5:15 PM >>On 16 Dec 2017, at 9:43pm, Nelson, Erik - 2 >>wrote: >> I'm using an application that I can't change. I can give it multiple >> queries to run but the application assumes that each query will produce

Re: [sqlite] Odd question

2017-12-16 Thread Nelson, Erik - 2
Petern wrote on Saturday, December 16, 2017 4:53 PM Re: Nelson "odd". This will make the desired (?) side effect happen: >.load eval.so >SELECT coalesce(eval('INSERT INTO table1 VALUES(a, b, c)'), 1) AS value; >If INSERT references columns from an outer scope then use printf() inside the

Re: [sqlite] Odd question

2017-12-16 Thread Simon Slavin
On 16 Dec 2017, at 9:43pm, Nelson, Erik - 2 wrote: > I'm using an application that I can't change. I can give it multiple queries > to run but the application assumes that each query will produce at least one > row and causes an error if that's not the

Re: [sqlite] Odd question

2017-12-16 Thread petern
ted traffic volume. > > >-Original Message- > >From: sqlite-users [mailto:sqlite-users- > >boun...@mailinglists.sqlite.org] On Behalf Of Nelson, Erik - 2 > >Sent: Saturday, 16 December, 2017 12:53 > >To: SQLite mailing list > >Subject: [sqlite] O

Re: [sqlite] Odd question

2017-12-16 Thread Nelson, Erik - 2
org] On Behalf Of Nelson, Erik - 2 >Sent: Saturday, 16 December, 2017 12:53 >To: SQLite mailing list >Subject: [sqlite] Odd question > >For unfortunate reasons, I need a query that does an insert and also >returns at least one row... for example, something along the lines of >

[sqlite] Odd question

2017-12-16 Thread Larry Brasfield
Nelson, Erik - 2 ​, on​ Sat, 16 Dec 2017 11:54:06 ​, wrote:​ ​> ​ For unfortunate reasons, I need a query that does an insert and also returns at ​> ​ least one row... for example, something along the lines of ​>​ ​> ​ Select 1 as value from (insert into table1 values(a, b, c)) ​>​ ​> Or ​> ​> ​

Re: [sqlite] Odd question

2017-12-16 Thread R Smith
On 2017/12/16 9:53 PM, Nelson, Erik - 2 wrote: For unfortunate reasons, I need a query that does an insert and also returns at least one row... for example, something along the lines of Select 1 as value from (insert into table1 values(a, b, c)) Or Select coalesce((insert into table1

Re: [sqlite] Odd question

2017-12-16 Thread Keith Medcalf
Saturday, 16 December, 2017 12:53 >To: SQLite mailing list >Subject: [sqlite] Odd question > >For unfortunate reasons, I need a query that does an insert and also >returns at least one row... for example, something along the lines of > >Select 1 as value from (insert into table1

[sqlite] Odd question

2017-12-16 Thread Nelson, Erik - 2
For unfortunate reasons, I need a query that does an insert and also returns at least one row... for example, something along the lines of Select 1 as value from (insert into table1 values(a, b, c)) Or Select coalesce((insert into table1 values(a, b, c)), 1) as value I've tried a number of