Thanks a lot - this works - could you tell me please what the 12,4 stand for?
I had this problem today as well. What I did to solve it was this:
select cast(field2 as numeric(12,4)) / field1 * 100
This will force monetdb into not simply doing integer division.
On Wed, Nov 4, 2009 at 6:09 PM, Roman Sokolyuk <romsok.tech@gmail.com> wrote:
> Hi,
>
> I am encountering the following issue:
>
> SELECT
> field1, //returns 4
> field2, //returns 1
> ( ( field2 / field1) * 100) //this returns zero - not what I want - I am
> looking for 25
>
> Am I doing something wrong with type conversion (integer/floating point)?
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> MonetDB-users mailing list
> MonetDB-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/monetdb-users
>
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
MonetDB-users mailing list
MonetDB-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/monetdb-users