On Wed, Oct 1, 2014 at 4:27 PM, jose isaias cabrera <jic...@cinops.xerox.com
> wrote:

>
> So, I needed to get a really low percentage and I went to the SQlite3
> command prompt and I typed,
>
> select  round(133/122000,10) as t;
>
> that gave me 0.0.  Then, I said, ok, let's try this,
>
> select round(1/2,10) as t;
>
> that also gave me 0.0.  Then I said, hmmmm, let me try this,
>

You're doing integer math. You need floating point:

select round(1/2,10) as t;
0.5


-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to