Hi Kolbeinn,
This was it ! Now you gave me the solution, I believe I really should
have drank some more coffee ;-)
Many thanks, 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 |
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-----Original Message-----
From: Kolbeinn Josepsson [mailto:Kolbeinn.Josepsson AT NYHERJI DOT IS]
Sent: Friday, 07 February, 2003 18:23
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: SQL problem ....
try this:
select sum(physical_mb)-(select sum(physical_mb) from occupancy where
stgpool_name='COPYLTO1_WIN') from occupancy where stgpool_name
='TAPELTO1_WIN'
PAC Brion Arnaud
<Arnaud.Brion@PAN To:
ADSM-L AT VM.MARIST DOT EDU
ALPINA.COM> cc:
Sent by: "ADSM: Subject: SQL problem
....
Dist Stor
Manager"
<[email protected]
.EDU>
07.02.2003 10:42
Please respond to
"ADSM: Dist Stor
Manager"
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 |
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|