>>I wrote a UDF that resides in a .prg. When I call the UDF from the command window, it returns the correct value which is a numeric with two decimal places.
>>
>>When I run the following SQL - SELECT from the command window, the value in the cursor for the function call is an integer, rounded from the numeric value returned by the UDF.
>>
>>select secondcallposition, secondcalltime, secondcallbeatenlengths, calcactsecondcall(secondcallposition, secondcalltime, secondcallbeatenlengths) ;
>> from horserec ;
>> into cursor a
>>
>>What can I do so that a numeric with two decimal places is returned by the UDF in the SQL - SELECT statement?
>
>select secondcallposition, secondcalltime, secondcallbeatenlengths, 0.00+calcactsecondcall(secondcallposition, secondcalltime, secondcallbeatenlengths) as newfield ;
> from horserec ;
> into cursor a
Thank you! It works beautifully!
Annemarie