[ADSM-L] Weird SQL output
2014-11-21 04:18:26
Hi guys!
I have some weird output from one of my SQL statements. Here it's is:
select count(*) from libvolumes where status='Private'
Unnamed[1]
------------
3698
Ok, so 3698 private volumes on this server. Now, how many contain data:
select count(*) from libvolumes where status='Private' and last_use = 'Data'
Unnamed[1]
------------
1011
Right, I know a lot of tapes do not have a value in the Last Use column (my
guess it is that these are tapes created by SAN clients), so how many are there:
select count(*) from libvolumes where status='Private' and last_use != 'Data'
Unnamed[1]
------------
0
Huh? There should be 3698-1011=2687! Last_use is empty then?
select count(*) from libvolumes where status='Private' and last_use=NULL
Unnamed[1]
------------
0
I'm lost here... I'm I doing something wrong? The total of last_use='Data' and
last_use!='Data' should be the same as the output from the query with no
last_used specified, right?
Thanks for any help in advance!
Kind regards,
Eric van Loon
********************************************************
For information, services and offers, please visit our web site:
http://www.klm.com. This e-mail and any attachment may contain confidential and
privileged material intended for the addressee only. If you are not the
addressee, you are notified that no part of the e-mail or any attachment may be
disclosed, copied or distributed, and that any other action related to this
e-mail or attachment is strictly prohibited, and may be unlawful. If you have
received this e-mail by error, please notify the sender immediately by return
e-mail, and delete this message.
Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries and/or its
employees shall not be liable for the incorrect or incomplete transmission of
this e-mail or any attachments, nor responsible for any delay in receipt.
Koninklijke Luchtvaart Maatschappij N.V. (also known as KLM Royal Dutch
Airlines) is registered in Amstelveen, The Netherlands, with registered number
33014286
********************************************************
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [ADSM-L] Weird SQL output,
Loon, EJ van (ITOPT3) - KLM <=
|
|
|