Re: No feedback for executing a mathematical expression
radovan5 <[email protected]> Tue, 10 Mar 2020 09:02:10 +0100
| Newsgroups | gmane.comp.db.sqlite.general |
|---|---|
| Message-ID | <[email protected]> |
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 99-(55/(30.0/57)) But I like that when you have integer numbers is like div function. You remember div function like: 10 div 5 = 2. On 10.03.2020 08:21, Octopus ZHANG wrote: > 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 > _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users