Hello, Tom. The searchable archive (www.adsm.org) has a few examples of how
to answer this question. I used "sql select time date event actlog" as my
search string, and I came up with a bunch of messages. Here are just a few;
I would recommend going to the archive yourself and searching for something
that might be more specifically suited to your needs.
http://msgs.adsm.org/cgi-bin/get/adsm9811/988.html
http://msgs.adsm.org/cgi-bin/get/adsm0010/191.html
http://msgs.adsm.org/cgi-bin/get/adsm0008/487.html
By the way, has anyone else noticed they have a "spiffy" new interface at
the web site?
Thanks,
Alex Paschal
Storage Administrator
Freightliner, LLC
(503) 745-6850 phone/vmail
-----Original Message-----
From: Tom Tann{s [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 01, 2000 10:09 AM
To: [EMAIL PROTECTED]
Subject: Re: TSM-SQL-question..
Yes, I know. This is similar to my example.
However, I want to something similar to q event begint=now-24, which is a
generic thing, rather than using the actual date/time as input.
On Fri, 1 Dec 2000, James Thompson wrote:
> Here is an example that might help.
>
>
> 'select * from EVENTS where scheduled_start>'08/01/2000' and
> scheduled_start<'08/31/2000'
>
> James Thompson
>
> >From: Tom Tann{s <[EMAIL PROTECTED]>
> >Reply-To: "ADSM: Dist Stor Manager" <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: TSM-SQL-question..
> >Date: Fri, 1 Dec 2000 17:59:17 +0100
> >
> >Hello!
> >Any SQL-experts out there?
> >
> >I have no experience with sql except from the few things I have learned
> >from the tsm-implementation.
> >
> >I want to query the events-table for avents for, lets say the last 24
> >hours.
> >
> >Just like with the q events, only entries since today 00:00 are displayed
> >as default.
> >in the q events you can add begind=today-1, begint=now-24 and similar.
> >
> >Is it possible to do the same in a sql-statement?
> >
> >I have been playing around a little, but the only way I have come up with
> >so far is to enter the fromdate explicitely like
> >
> >tsm: SUMO>select SCHEDULED_START,NODE_NAME,SCHEDULE_NAME from events
where
> >SCHED ULED_START \> '2000-11-30 12:13:14'
> >
> >works, and I thought also the following wold works, but only returns
> >entries from after today 00:00:
> >
> >tsm: SUMO>select SCHEDULED_START,NODE_NAME,SCHEDULE_NAME from events
where
> > cast((current_timestamp-SCHEDULED_START)hours as decimal) < 24
> >
> >
> >What am I missing here?
> >
> >Any suggestions/comments on this wold be appreciated..
> >
> > Tom
>
>
____________________________________________________________________________
_________
> Get more from the Web. FREE MSN Explorer download :
http://explorer.msn.com
>