MapInfo's definition of MOD assumes all the numbers itii operates on are
integers, and in the range of short integers (SmallInts) as well. You'll
have to do some tricky math to use mod for this purpose. Another way to
find numbers without fractional components is to use the int function,
e.g. find cases where:

n - int(n) = 0

- Bill Thoen

 On Tue, 12 Nov 2002 [EMAIL PROTECTED] wrote:

>
> Hi all,
>
> I wish to extract all tuples from a table that have a value without a decimal part 
>in a float field (ie 1 not 1.2; 75 not 75.6) but I cannot seem to get the 'MOD' 
>function to operate as my rusty maths remembers that it should.
>
> Theory: (Math based expected behaviour, checked on a scientific calculator)
>       5.6 mod 1 = 0.6
>
> Practice: (MIPro apparent behaviour)
>       5.6 mod 1 = 0
>
> I have tried updating into all three numeric field types with no success.
>
> Update <tablename> Set HeightFloat = <FloatField> mod 1
> Update <tablename> Set HeightDec = <FloatField> mod 1
> Update <tablename> Set HeightInt = <FloatField> mod 1
>
> After running these updates all the Height fields are still zero :(
>
> The <FloatField> definitely contains a range of values from 0.0 to 118.0 and 
>contains a range of whole and partial numbers.
> the table has 107435 elements/tuples.
>
> I am using MapInfo Professional Version 7.0 Release Build 26 on Windows 2000 incase 
>that has any bearing on the issue :)
>
> Could I be using the operator in an inappropriate way with respect to MIPro or may 
>it just not be working properly......???
>
> Any suggestions greatly appreciated!
> thanks in advance
> Korinne
>
>
>
> Get your free encrypted email at https://www.hushmail.com
>
> ---------------------------------------------------------------------
> List hosting provided by Directions Magazine | www.directionsmag.com |
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> Message number: 4057
>


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 4058

Reply via email to