Finding yesterday

pbanghart

ADSM.ORG Member
Joined
Sep 16, 2002
Messages
40
Reaction score
0
Points
0
Website
Visit site
Okay, I'm sooo close to getting what I want, but I need some help finding yesterday...



I'm trying to run the following script to get a count of the backups scheduled for the past 24 hours:



select count (*) as "# Servers" from events where domain_name = '<my policy>' and scheduled_start > (...24 hours ago...).



It's that last part ("...24 hours ago...") that I can't figure out. Can anyone out there tell me how I can select events from yesterday without hard-coding a date/time entry?

:confused:



Thanks in advance...





-PB
 
Alrighty, then...with help from other postings, I found my answer!



In order to get the number of clients from a specific policy that were scheduled to run over the last 24 hours:



SELECT COUNT(*) AS "Scheduled Clients" FROM EVENTS WHERE DOMAIN_NAME= <any Domain> AND SCHEDULED_START BETWEEN '2003-01-01' AND '2099-12-31' AND CURRENT_TIMESTAMP-SCHEDULED_START<'1 00:00:00'



My thanks to those that posted the bits & pieces that helped me towards my goal...hence my reason for posting this, in case anyone else may find it useful.



Cheers!





-PB

:cool:
 
Back
Top