Hi,
add the lines below to your query.sql and you should be good to go,
adding a time period parameter should be trivial (check the other
examples in query.sql).
HTH Uwe
######################################################################
:List all clients without a backup in the last week
SELECT C.name FROM Client C WHERE NOT EXISTS
( SELECT jobid
FROM Job J
WHERE J.endtime > date_sub( now(),INTERVAL 1 week )
AND J.clientid = C.clientid
)
ORDER BY name
######################################################################
BTW, is it possible to select a query by cmd line parameter and pipe
it to bconsole like so?
echo "query id=14 <param>" | bconsole
Uwe
--
NIONEX --- Ein Unternehmen der Bertelsmann SE & Co. KGaA
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
|