You could also look at volhistory where use(?)='STGNEW' and date =desired range.
________________________________ From: ADSM: Dist Stor Manager on behalf of Ribeiro, Ricardo Sent: Fri 1/4/2008 2:51 PM To: ADSM-L@VM.MARIST.EDU Subject: Re: [ADSM-L] Select statement Thank you! -----Original Message----- From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] On Behalf Of Richard Sims Sent: Friday, January 04, 2008 12:47 PM To: ADSM-L@VM.MARIST.EDU Subject: Re: [ADSM-L] Select statement On Jan 4, 2008, at 1:12 PM, Ribeiro, Ricardo wrote: > Hello, > Does anyone has a select statement I can use to find out how many > tapes I used on a daily basis? > Thanks! Most commonly, tapes automatically come from the scratches collection and return to scratch when emptied (rather than being assigned to a storage pool via DEFine Volume). And, UPDate Volume is rarely performed on volumes such that the administrative change timestamp remains that of when the volume was taken from scratch to be used in a storage pool. For basic reporting you can thus employ a variant of a Select statement like: select * from volumes where DAYS(CURRENT_DATE)-DAYS(CHG_TIME)<2 and DATE(LAST_WRITE_DATE)=DATE(CURRENT_TIMESTAMP) From that point of departure you can play with timestamps for desired intervals, and further select on STATUS value as desired. Richard Sims http://people.bu.edu/rbs/