ADSM-L

SQL problem ....

2003-02-07 05:43:28
Subject: SQL problem ....
From: PAC Brion Arnaud <Arnaud.Brion AT PANALPINA DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Fri, 7 Feb 2003 11:42:39 +0100
Hi list,

Could any SQL genius explain me wat is wrong with this statement :

select sum(physical_mb) from occupancy where stgpool_name='TAPELTO1_WIN' - 
(select sum(physical_mb) from occupancy where stgpool_name='COPYLTO1_WIN' )

When trying to use it II get following output : 
ANR2916E The SQL data types CHAR(12) and DECIMAL(31,2) are incompatible for 
operator '-'. 
I already tried to add "dec()" on both selects without achieving any valuable 
result ... is it a bug or do I need  additional coffee to wake up my mind ?
What I'm trying to achieve is to calculate the remaining amount of data to copy 
before a backup stgpool process finishes.
Thanks in advance !
Cheers.

Arnaud

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| Arnaud Brion, Panalpina Management Ltd., IT Group     |
| Viaduktstrasse 42, P.O. Box, 4002 Basel - Switzerland |
| Phone: +41 61 226 19 78 / Fax: +41 61 226 17 01       | 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

<Prev in Thread] Current Thread [Next in Thread>