Subject UDF help
Author Charles Urbina
I trying to duplicate a formula that I have used in an excell sheet. now I
need to use it in a stored procedure but I get an error when I compile it.

Error "invalid data type, length, or value Function SR_Trunc could not be
matched" I also tried using F_TRUNCATE function and I get the same result.

/* This is my Excell formulas */


/* In my Stored procedure*/
this one gives the error.

IF (:D4 > 9) then
D4 = SR_TRUNC((:D4-MOD(:D4,10))/10 + MOD(:D4,10),:D4);

/* In my Stored procedure*/
when I use this line I don get an error but I don't get the correct result
from the formula.

IF (:D4 > 9) then
D4 = SR_TRUNC(:D4-MOD(:D4,10))/10 + MOD(:D4,10);

Can someone help me creating a formula with IB that will generate the same
result as the one in excell.

Charles Urbina