Hi Tamar!
Thanks for help!
>>
VFP8:>>MOD(10-12,12) = 10
>>
>>
SQL:>>(10-12) % 12 = -2
>>
>>I need to use Modulo in my sql-syntax - what have I done wrong???
>>
>
>What you've really done wrong is tried to use modulo with a negative number. That operation isn't defined mathematically for negative numbers. However, as you've learned, programming languages let you do it anyway. It's not surprising, though, that two different engines (I'm assuming that by "SQL," you mean SQL Server, not VFP's SQL engine) give you two different results.
>
>Tamar
robert.oh.