Kbase 16440: Sybase10 stored-procedure returns 5 decimals for Float value
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/05/1998 |
|
Sybase10 stored-procedure returns 5 decimals for Float value
When using the Sybase10 (or Sybase11) dataserver, the number of
decimal places or precision returned for a FLOAT datatype in a
stored-procedure is 5. This is a hard-coded value in our data
conversion routine; hence there is no way to specify the
desired number of decimal places for a stored-procedure
return value. There is no plan to change this feature.
To illustrate this:
1. Create a sybase database by running protos10
(see Dataserver for Sybase Guide for detail instructions).
2. Create the a stored-procedure in Sybase database using isql:
create procedure divide @mult1 float as
select qty, qty * price / @mult1
from order_line
where qty * price / @mult1 < 1
3. Do a schemapull of this new stored-procedure into your schema
holder.
4. Run the following 4GL code:
run stored-proc divide (121.78889).
for each proc-text-buffer:
display proc-text-buffer.
end.
proc-text
_____________
4 0.08375
10 0.20938
23 0.48157
20 0.45160
5 0.27835
5. Run the following isql statements in Sybase:
1> exec divide 121.78889
2> go
qty
----------- --------------------
4 0.083751
10 0.209379
23 0.481571
20 0.451601
5 0.278351
(5 rows affected, return status = 0)
ick 12/4/96
Progress Software Technical Support Note # 16440