Hi Robert, for the empty once SELECT LIBVOLUMES.LIBRARY_NAME, LIBVOLUMES.VOLUME_NAME, LIBVOLUMES.STATUS, LIBVOLUMES.LAST_USE, VOLUMES.STATUS FROM LIBVOLUMES LIBVOLUMES, VOLUMES VOLUMES WHERE LIBVOLUMES.VOLUME_NAME = VOLUMES.VOLUME_NAME AND ((VOLUMES.STATUS ='EMPTY'))
this select will give you all volumes that aren't scratch, and do not belong to a storage pool, when the volume status is private and has no last use it is propably a label reading error. When a volume is returned that is private and last use data, than there is a problem, what exactly causes that I don't know, but it is worth checkin out. SELECT l.volume_name, L.LIBRARY_NAME, L.STATUS, L.LAST_USE FROM LIBVOLUMES AS L WHERE L.STATUS<>'Scratch' and not exists (select volumes.volume_name from volumes where volumes.volume_name = l.volume_name) Mit freundlichen Grüßen / Best Regards Markus Veit An: [EMAIL PROTECTED] Kopie: Thema: Help on Select command [EMAIL PROTECTED] Received : 30.01.2003 08:56 Bitte antworten an "ADSM: Dist Stor Manager" Hi to all I try to figure the correct select syntax to get the volumes from a library where the status is Private and the last use is empty: I run: select * from libvolumes where library_name='SCALAR' and status='Private' and last_use=' ' and got: ANR2034E SELECT: No match found using this criteria. But in fact I had some volumes .... Any help will be appreciate. Regards Robert Ouzen E-mail:[EMAIL PROTECTED]