ADSM-L

Re: select statement syntax

2003-10-03 11:43:02
Subject: Re: select statement syntax
From: Andrew Raibeck <storman AT US.IBM DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Fri, 3 Oct 2003 09:38:45 -0600
Joni, this is a known limitation/restriction of using the EVENTS table:
you can not use "calculated" dates when comparing start times. You need to
code a specific date/time value. For example:

select node_name, scheduled_start, schedule_name, status -
   from events -
   where (node_name like 'HM%' or node_name like 'PA%') -
   and scheduled_start>'2003-10-02' -
   order by node_name

You could wrap a script around the SELECT statement, letting the script
figure out the date for "yesterday" so it can stick it in the SELECT
statement.

You could do something similar with the ODBC driver and an ODBC
application, where the application figures out the date for you, then
sticks it in the SELECT statement submitted to the ODBC driver.

Regards,

Andy

Andy Raibeck
IBM Software Group
Tivoli Storage Manager Client Development
Internal Notes e-mail: Andrew Raibeck/Tucson/IBM@IBMUS
Internet e-mail: storman AT us.ibm DOT com

The only dumb question is the one that goes unasked.
The command line is your friend.
"Good enough" is the enemy of excellence.




Joni Moyer <joni.moyer AT HIGHMARK DOT COM>
Sent by: "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>
10/03/2003 07:04
Please respond to "ADSM: Dist Stor Manager"

        To:     ADSM-L AT VM.MARIST DOT EDU
        cc:
        Subject:        select statement syntax


Hello everyone!

I have tried this select statement many times with no success.  I thought
that this statement had previously worked, but now I'm having problems
again...  I am looking for all nodes that begin with HM and PA for the
past
day.  Does anyone have any suggestions?  This is on a mainframe TSM server
5.1.6.2 and I am trying to query NT clients.  I have also tried to create
this through the TSM Opertional Reporting tool without any luck, so I am
assuming that something is wrong with my syntax.  Thanks in advance!!!

select node_name, scheduled_start, schedule_name, status -
   from events -
   where (node_name like 'HM%' or node_name like 'PA%') -
   and scheduled_start>current_timestamp - 1 day -
   order by node_name

Joni Moyer
Systems Programmer
joni.moyer AT highmark DOT com
(717)975-8338

<Prev in Thread] Current Thread [Next in Thread>