ADSM-L

Re: Bad results from a SELECT ...

1998-05-14 09:12:40
Subject: Re: Bad results from a SELECT ...
From: Rui Malheiro <rmalheiro AT MAIL.TELEPAC DOT PT>
Date: Thu, 14 May 1998 13:12:40 GMT
Replying to: "Mapes, Mark" <MWM4 AT PGE DOT COM> (Wed, 13 May 1998 07:10:25 
-0700)
>Mike,
>Mike,
>
>Yes, the SQLMATHMODE does explain the difference between the "q vol" and the
>"select *".
>
>By the way, my "select volume_name as volume, pct_reclaim, pct_utilized from
>volumes" as identified below worked too.  I have seen this before, where I
>did get funny results from SQL, but after exiting and re-entering the
>dsmadmc environment, the result seem to look good.  But the real problem
>still exists, that is when I issue the following select statement, the
>results for all three numeric colums comes back being the same.
>
>select left(volume_name,6) as volume, pct_reclaim, pct_utilized,
>pct_reclaim+pct_utilized from volumes order by 4 desc
>
>Do you get the same results?

There seems to be a problem with ORDER BY. I tried the command you suggested
and pct_reclaim and pct_utilized displayed the same value as
pct_reclaimed+pct_utilized. Without the ORDER BY the values look OK. 

Further testing shows that whenever you specify a numeric column and ORDER
BY any column the numeric values displayed will be those of the last column.

AIX Server V3.1.1.2

--
Rui Malheiro,
Rui Malheiro,
6 Mil - Tecnologias de Informacao
URL: <http://www.6mil.pt/>
<Prev in Thread] Current Thread [Next in Thread>