[sqlite] SELECT SUM(...) FROM ... WHERE regression in 3.8.11

2015-10-25 Thread Simon Slavin
On 24 Oct 2015, at 8:23pm, Catalin Ionescu wrote: > So far I never used the command-line shell. It is clearly compiled with > different optimization settings and that might be the cause of apparent > correct functionality. Anyway, I decided to give it a try and attack the > problem as a

[sqlite] SELECT SUM(...) FROM ... WHERE regression in 3.8.11

2015-10-25 Thread Catalin Ionescu
Hi, Indeed, this fixes the problem! Many thanks! On 24.10.2015 23:47, Richard Hipp wrote: > Dan checked in a fix > (https://www.sqlite.org/src/info/bfea226d0d226a04) that may fix your > problem. It might also be that you can work around your problem by > setting: > > PRAGMA

[sqlite] SELECT SUM(...) FROM ... WHERE regression in 3.8.11

2015-10-24 Thread Catalin Ionescu
Hi, So far I never used the command-line shell. It is clearly compiled with different optimization settings and that might be the cause of apparent correct functionality. Anyway, I decided to give it a try and attack the problem as a whole (I suspected, from previous experience, that the bug

[sqlite] SELECT SUM(...) FROM ... WHERE regression in 3.8.11

2015-10-24 Thread Richard Hipp
Dan checked in a fix (https://www.sqlite.org/src/info/bfea226d0d226a04) that may fix your problem. It might also be that you can work around your problem by setting: PRAGMA automatic_index=OFF; Please try these and let us know whether or not they help. On 10/24/15, Catalin Ionescu wrote:

[sqlite] SELECT SUM(...) FROM ... WHERE regression in 3.8.11

2015-10-24 Thread Richard Hipp
On 10/24/15, Catalin Ionescu wrote: > Hi! > > The attached database shows the problem. Just check Stocks_View for > CompID 231. Normally it should be 0, but it gives 5. There are correctly > computed 8 inputs but wrongly computed 3 outputs. When I run "SELECT * FROM Stocks_View WHERE CompID=231"

[sqlite] SELECT SUM(...) FROM ... WHERE regression in 3.8.11

2015-10-24 Thread Catalin Ionescu
Hi! The attached database shows the problem. Just check Stocks_View for CompID 231. Normally it should be 0, but it gives 5. There are correctly computed 8 inputs but wrongly computed 3 outputs. Catalin On 22.10.2015 15:19, Richard Hipp wrote: > Thanks for the report. > > Can you also provide

[sqlite] SELECT SUM(...) FROM ... WHERE regression in 3.8.11

2015-10-22 Thread Catalin Ionescu
I will prepare a version of my DB file with dummy customers and suppliers names (not too many) and I can pass it as it is. On 22.10.2015 15:19, Richard Hipp wrote: > Thanks for the report. > > Can you also provide us with a test case that demonstrates the malfunction? > > On 10/22/15, Catalin

[sqlite] SELECT SUM(...) FROM ... WHERE regression in 3.8.11

2015-10-22 Thread Catalin Ionescu
I have an internal stocks management application that I rebuild from time to time, usually against the latest SQLite version. After moving to SQLite 3.9.1 it started reporting crazy stock values. Previously it was compiled with SQLite 3.8.8.3. Further investigation showed that the last usable

[sqlite] SELECT SUM(...) FROM ... WHERE regression in 3.8.11

2015-10-22 Thread Richard Hipp
Thanks for the report. Can you also provide us with a test case that demonstrates the malfunction? On 10/22/15, Catalin Ionescu wrote: > I have an internal stocks management application that I rebuild from > time to time, usually against the latest SQLite version. After moving to > SQLite 3.9.1

Re: [sqlite] SELECT SUM( IF(

2004-11-13 Thread Daniel K
--- [EMAIL PROTECTED] wrote: > Hello, > > Does SQLite have kind of conditional select > expression like: > SELECT SUM( IF(column1='Y', column2, 0 ) FROM ... ? > > > Rainer > > It has the CASE expression. i.e. SELECT sum( CASE WHEN column1='Y' THEN column2 ELSE 0 END) FROM ...

[sqlite] SELECT SUM( IF(

2004-11-13 Thread rainer
Hello, Does SQLite have kind of conditional select expression like: SELECT SUM( IF(column1='Y', column2, 0 ) FROM ... ? Rainer