473,408 Members | 2,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Precision of results

Hi all,

I am using DB2 V8.2(German version) under Windows XP.

I would like to have that the results shown in "Abfrageergebnisse" (I don't
know which the equivalent in the English version is; something like "query
results"?) are shown in the precision they really have. For example, in a
field distance, I see a value "0.003". When I click on this value, I get the
value "0.00291822977162526". What do I have to do that this value is written
in the field just when getting my results (so that I see this value from
beginning and don't have to click on the value for each tuple to see the
exact result)?

Thanks for ideas,
Ina
Nov 23 '05 #1
6 1450
How was the column defined in DB2 (datatype?)?
What is the select statement you use ?

I suppose you are talking about the command editor GUI.

What do you get when executing the select statement directly from
command line ?

Nov 23 '05 #2
What is the select statement you use ? The statement I use is:
select
(DB2GSE.ST_DISTANCE(
DB2GSE.ST_POINT(-0.323303542642646,0.733228164188898,-0.59820671891487,1006),
DB2GSE.ST_POINT(-0.31174530635498898,0.72492324763692095,-0.61424844240842302,1006),'decimal
degree')) as spatial_distance from spatialtest
What do you get when executing the select statement directly from
command line ?

SPATIAL_DISTANCE
------------------------
+1,42331832700911E-002

But when I execute this in the GUI, I just get: 0.014. I just get the exact
value when I click on 0.014.
I would like to get the exact value also in the GUI. Do you have any idea
how to get this?

Thanks for ideas,
Ina
Nov 23 '05 #3
I don't believe you can. The GUI appl. receives the actual value but the
program specifies a different representation of the data so that it will fit
on the screen (most likely thought for now).
That piece of code would have to be changed and you get that by issuing a
change request to IBM.
I believe the group that supports this is stil the User DEsign Center at the
lab in Toronto.
HTH, Pierre.

--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"Ina Schmitz" <we*@inalein.net> a écrit dans le message de news:
dl*************@news.t-online.com...
What is the select statement you use ?

The statement I use is:
select
(DB2GSE.ST_DISTANCE(
DB2GSE.ST_POINT(-0.323303542642646,0.733228164188898,-0.59820671891487,1006),
DB2GSE.ST_POINT(-0.31174530635498898,0.72492324763692095,-0.61424844240842302,1006),'decimal
degree')) as spatial_distance from spatialtest
What do you get when executing the select statement directly from
command line ?

SPATIAL_DISTANCE
------------------------
+1,42331832700911E-002

But when I execute this in the GUI, I just get: 0.014. I just get the
exact value when I click on 0.014.
I would like to get the exact value also in the GUI. Do you have any idea
how to get this?

Thanks for ideas,
Ina


Nov 23 '05 #4
Ina,
I never used spatial extender.
Stíll, when I look at the GUI, I see also decimal values complete.

did you try resizing the column, so it shows longer numbers? Still, fo
me it shows 0.002... and not a rounded value.

Still, in your case it is more a user defined type from spatial
extender. why not using the sample selects with the ST_AsText point
function given in the documentation ?

http://publib.boulder.ibm.com/infoce...t/rsbp4133.htm

Nov 23 '05 #5
juliane26 wrote:
Ina,
I never used spatial extender.
StĂ*ll, when I look at the GUI, I see also decimal values complete.

did you try resizing the column, so it shows longer numbers? Still, fo
me it shows 0.002... and not a rounded value.

Still, in your case it is more a user defined type from spatial
extender. why not using the sample selects with the ST_AsText point
function given in the documentation ?

http://publib.boulder.ibm.com/infoce...t/rsbp4133.htm

That's because ST_Distance returns a numeric value and not a geometry. So
you can't simply convert it to a text representation using the ST_AsText
method. But you could use a CHAR function to get a similar conversion:

SELECT CHAR(DB2GSE.ST_POINT(-0.323303542642646, 0.733228164188898,
-0.59820671891487, 1006)..ST_Distance(db2gse.ST_POINT(-0.31174530635498898,
0.72492324763692095, -0.61424844240842302, 1006),'decimal degree')) as
spatial_distance
FROM spatialtest
I also agree that this is a GUI thing. What do you want to do with the
query? Incorporate it into an application or just run them ad-hoc?

You could also run the query on the command line. That would also avoid the
issue and give you the exact results.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Nov 23 '05 #6
If GUI means Command Editor, did you check the following check box?
Tools -> Tools Settings -> Command Editor -> Display results for a
single query on the Query Result Page
If so, how about remove the check?

Nov 24 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Ladvánszky Károly | last post by:
Entering 3.4 in Python yields 3.3999999999999999. I know it is due to the fact that 3.4 can not be precisely expressed by the powers of 2. Can the float handling rules of the underlying layers be...
16
by: BigMan | last post by:
How can I check if assignment of a float to a double (or vice versa) will result in loss of precision?
5
by: DAVID SCHULMAN | last post by:
I've been trying to perform a calculation that has been running into an underflow (insufficient precision) problem in Microsoft Excel, which calculates using at most 15 significant digits. For this...
3
by: Madan | last post by:
Hi all, I had problem regarding float/double arithmetic only with + and - operations, which gives inaccurate precisions. I would like to know how the arithmetic operations are internally handled...
12
by: Chadwick Boggs | last post by:
I need to perform modulo operations on extremely large numbers. The % operator is giving me number out of range errors and the mod(x, y) function simply seems to return the wrong results. Also,...
6
by: R.Biloti | last post by:
Hi folks I wrote the naive program to show up the unit roundoff (machine precision) for single and double precision: #include <stdio.h> int main (void) { double x;
10
by: Artemio | last post by:
Hello all! I just stumbled across a weird problem with precision of a division operation. I am on Mac OS X, GCC 4.0.1. Say I have two float or double numbers, and I want to divide one by...
8
by: Grant Edwards | last post by:
I'm pretty sure the answer is "no", but before I give up on the idea, I thought I'd ask... Is there any way to do single-precision floating point calculations in Python? I know the various...
6
by: Matthew | last post by:
Hi, I want to change the precision level of floating point variables and calculations which is done in php.ini. However the server I rent for my domain does not give me access to php.ini,...
0
by: Charles Coldwell | last post by:
James Kanze <james.kanze@gmail.comwrites: True, with some additional considerations. The commonly used IEEE 754 floating point formats are single precision: 32 bits including 1 sign bit, 23...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.