Hi ,
I have a problem on displaying a float value on my ingres database.the
version is 6.
I fact when displaying the Value is rounded.
For instance the value 11.0595E+6 is displaying as 1.106E+7.
How can I set the option of the precision of float in my EQUEL
session.
I saw that in sql command line you can do : sql -f8G16.8 database to
have the correct float precision in my session.
But I do not manage doing this in EQUEL ( Embedded QUEL ).I try to do
EXEC SQL CONNECT -f8G16.8 :database but that does not work.
Can you help me ?
Roy Hann - 19 Nov 2003 13:21 GMT
> Hi ,
>
[quoted text clipped - 9 lines]
> EXEC SQL CONNECT -f8G16.8 :database but that does not work.
> Can you help me ?
I'm not sure I can. In an EQUEL application a floating point attribute is
returned as a 4-byte or 8-byte floating point value using the native
hardware representation of the client. It actually is a hardware float4 or
float8, not a formatted ASCII representation of the float. It is up to the
application to format it appropriately for display. What is your host
language?
Roy Hann (rhann at rationalcommerce dot com)
Rational Commerce Ltd.
www.rationalcommerce.com
"Ingres development, tuning, and training experts"
kbcomput@kbcomputer.com - 19 Nov 2003 15:28 GMT
> I have a problem on displaying a float value on my ingres database.the
> version is 6.
[quoted text clipped - 7 lines]
> EXEC SQL CONNECT -f8G16.8 :database but that does not work.
> Can you help me ?
To answer your question, you need to put the -f8G16.8 flag onto
the ## ingres line, which is the QUEL equivalent of a CONNECT:
## ingres flag flag ... database-name
But as Roy pointed out, unless you're doing something like a
retrieve (thing=varchar(float_column)..., which does the conversion on
the server side, EQUEL is returning the float to your program as a float.
And, it's your program that's formatting it and displaying it!
Karl
R?my - 19 Nov 2003 16:13 GMT
> Hi ,
>
[quoted text clipped - 9 lines]
> EXEC SQL CONNECT -f8G16.8 :database but that does not work.
> Can you help me ?
I finally find how to set my options.
You have to do like this
EXEC SQL CONNECT :database options = "-f8G16.8";