Hi, I'm not sure I follow what your after, but you may be able to alter this script to get the desired effect,
http://www.tsmwiki.com/tsmwiki/SelectStatements/ReclaimableByDays That script runs several queries to show how many volumes went pending by stgpool by day. Adding in the extra clauses you have in your statement, you may be able to show what your after. I would try and make the script.. but it's 17:00pm and I have a bus to catch!! Matthew Warren. -----Original Message----- From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] On Behalf Of Joni Moyer Sent: Tuesday, July 05, 2005 2:50 PM To: ADSM-L@VM.MARIST.EDU Subject: Tape return script question? Hello, I have created this script to create a request listing of tapes to be returned from our vault when they are empty. As you can see from the select statement that I run daily it will have duplicates within it since I have a delay of 5 days. Is there a certain way I can manipulate this script so that on the 1st day that a tape becomes pending it is placed within this listing? Or is there an easier way to create this list? Thanks in advance for your help! select volume_name from volumes where stgpool_name='TAPE_NDMP_OFFSITE' and devclass_name='NASDEV' and status='PENDING' or status='EMPTY' and volume_name like 'N%' order by volume_name ******************************** Joni Moyer Highmark Storage Systems Work:(717)302-6603 Fax:(717)302-5974 [EMAIL PROTECTED] ******************************** ___________________________ Disclaimer Notice __________________________ This message and any attachments are confidential and should only be read by those to whom they are addressed. If you are not the intended recipient, please contact us, delete the message from your computer and destroy any copies. Any distribution or copying without our prior permission is prohibited. Internet communications are not always secure and therefore Powergen Retail Limited does not accept legal responsibility for this message. The recipient is responsible for verifying its authenticity before acting on the contents. Any views or opinions presented are solely those of the author and do not necessarily represent those of Powergen Retail Limited. Powergen Retail Ltd is authorised and regulated by the Financial Services Authority for the sale and service of general insurance products. Registered addresses: Powergen Retail Limited, Westwood Way, Westwood Business Park, Coventry, CV4 8LG. Registered in England and Wales No: 3407430 Telephone +44 (0) 2476 42 4000 Fax +44 (0) 2476 42 5432