On Sat, 5 Aug 2006, Eric Bollengier wrote: > You can try this (change Pool.Name and MediaType) > > SELECT Media.VolumeName AS volumename, > Media.VolStatus AS volstatus, > Media.LastWritten AS lastwritten, > Media.MediaType AS mediatype, > Media.VolMounts AS volmounts, > Pool.Name AS name, > FROM_UNIXTIME( > UNIX_TIMESTAMP(Media.LastWritten) > + (Media.VolRetention) > ) AS expire > FROM Media > INNER JOIN Pool ON (Pool.PoolId = Media.PoolId) > > WHERE Media.InChanger <> 1 > AND Media.VolStatus IN ('Purged', 'Full', 'Append') > AND Media.Recycle = 1
As a FWIW.... INNER/OUTER joins are mostly used as a substitute for MySQLs inability to do subselects. MySQL v4 onwards can do subselects and they are a LOT faster than INNER/OUTER JOIN. AB ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users