Page 1 of 1

dec(9,2) and keychange problem.

Posted: Mon Apr 25, 2005 2:09 pm
by ds_is_fun
Im trying to perform a business logic where I sort on columns.
Then I use the keychange column.
Im trying to catch a column which is a decimal(9,2). If this value = 0
Then I say target column = keychange * -1.
Now the target column is also defined as a decimal value. The keychange out of DS is TinyInt.
The logic doesnt seem to perform well.
It seems to catch all decimal(9,2) as 0 and also non-zero values as 0.
What is the best conversion I should use for this.

If col1(dec9,2) = 0 Then 0
Else keyChange(TinyInt) * -1

Thanks!