ADSM-L

Re: TSM-SQL-question..

2000-12-01 13:08:04
Subject: Re: TSM-SQL-question..
From: Tom Tann{s <tom.tannas AT USIT.UIO DOT NO>
Date: Fri, 1 Dec 2000 19:08:31 +0100
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 <tom.tannas AT USIT.UIO DOT NO>
> >Reply-To: "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>
> >To: ADSM-L AT VM.MARIST DOT EDU
> >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
>
<Prev in Thread] Current Thread [Next in Thread>