Re: [sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread P Kishor
Hi, Besides the most excellent explanation given by Keith Medcalf, I want to point out a couple of (hopefully) helpful things – 1. Contrary to your subject line, SQLite actually does give a feedback/returns something. It is just not good enough (for many of us). Consider the following: ``` ○

Re: [sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread Jose Isaias Cabrera
Simon Slavin, on Tuesday, March 10, 2020 09:23 AM, wrote... > > On 10 Mar 2020, at 12:40pm, Jose Isaias Cabrera > wrote: > > > Simon Slavin, on Tuesday, March 10, 2020 03:25 AM, wrote... > > > >> That's going in my list of annoying questions. Thank you. > > > > Simon, with all due respect, and

Re: [sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread Simon Slavin
On 10 Mar 2020, at 12:40pm, Jose Isaias Cabrera wrote: > Simon Slavin, on Tuesday, March 10, 2020 03:25 AM, wrote... > >> That's going in my list of annoying questions. Thank you. > > Simon, with all due respect, and grateful for all the answers you have > provided to me, this is not an

Re: [sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread Jose Isaias Cabrera
Keith Medcalf, on Tuesday, March 10, 2020 03:57 AM, wrote... > > > On Tuesday, 10 March, 2020 01:22, Octopus ZHANG > wrote: > > >I try to run a simple math expression, but SQLite gives no feedback : > > >sqlite> select 99-(55/(30/57)); > > >Should I expect it to return nothing? > > It is

Re: [sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread Jose Isaias Cabrera
Simon Slavin, on Tuesday, March 10, 2020 03:25 AM, wrote... > > On 10 Mar 2020, at 7:21am, Octopus ZHANG wrote: > > > sqlite> select 99-(55/(30/57)); > > > > Should I expect it to return nothing? > > That's going in my list of annoying questions. Thank you. Simon, with all due respect, and

Re: [sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread P Kishor
A very helpful and clear explanation to many of us not familiar with SQLite’s math idiosyncracies, or simply needing a refresher. Many thanks Keith. > On Mar 10, 2020, at 8:57 AM, Keith Medcalf wrote: > > > On Tuesday, 10 March, 2020 01:22, Octopus ZHANG > wrote: > >> I try to run a simple

Re: [sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread Octopus ZHANG
I will use floating point as you all suggested. Thank you! Simon Slavin 于2020年3月10日周二 下午3:25写道: > On 10 Mar 2020, at 7:21am, Octopus ZHANG wrote: > > > sqlite> select 99-(55/(30/57)); > > > > Should I expect it to return nothing? > > That's going in my list of annoying questions. Thank you. >

Re: [sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread Octopus ZHANG
Thanks for the detailed explanation! Keith Medcalf 于2020年3月10日周二 下午3:58写道: > > On Tuesday, 10 March, 2020 01:22, Octopus ZHANG > wrote: > > >I try to run a simple math expression, but SQLite gives no feedback : > > >sqlite> select 99-(55/(30/57)); > > >Should I expect it to return nothing? > >

Re: [sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread Octopus ZHANG
Yeah, I expected it should show the error message. I will check the related threads. radovan5 于2020年3月10日周二 下午4:02写道: > Hi, > > because sqlite calculate expression 30/57 as zero or 0. > So this give then divide by zero error when 55/0 is calculated. > Search more on google "Divide by 0 not

Re: [sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread radovan5
Hi, because sqlite calculate expression 30/57 as zero or 0. So this give then divide by zero error when 55/0 is calculated. Search more on google "Divide by 0 not giving error in sqlite". If you need to calculate you must change this so that one number has affinity real like this: select

Re: [sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread Keith Medcalf
On Tuesday, 10 March, 2020 01:22, Octopus ZHANG wrote: >I try to run a simple math expression, but SQLite gives no feedback : >sqlite> select 99-(55/(30/57)); >Should I expect it to return nothing? It is returning something. It is returning NULL. sqlite> .nullvalue sqlite> select

Re: [sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread Simon Slavin
On 10 Mar 2020, at 7:21am, Octopus ZHANG wrote: > sqlite> select 99-(55/(30/57)); > > Should I expect it to return nothing? That's going in my list of annoying questions. Thank you. sqlite> select 99.0-(55.0/(30.0/57.0)); -5.5 Now you can work out what the problem is.

[sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread Octopus ZHANG
Hi all, I try to run a simple math expression, but SQLite gives no feedback : sqlite> select 99-(55/(30/57)); Should I expect it to return nothing? Thank you -- Yushan ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org