ADSM-L

Re: SQL query question

2000-04-18 17:04:51
Subject: Re: SQL query question
From: Andy Raibeck <Andrew_Raibeck AT TIVOLI DOT COM>
Date: Tue, 18 Apr 2000 14:04:51 -0700
Hi Cindy,

How about using the "right()" function around the "message" column
(the rest of the statement is fine):

select nodename, msgno, date_time, right(message, 9) as "Elapsed time"
   from actlog
   where nodename like 'TN%BR%'
      and msgno=4964
      and date_time between '2000-04-17 18:00:00' and '2000-04-18 07:00:00'
   order by nodename

Regards,

Andy

Andy Raibeck
IBM
Tivoli Storage Manager Client Development
e-mail: storman AT us.ibm DOT com
"The only dumb question is the one that goes unasked."

I enter the following select command and get this result.

select nodename,msgno,date_time,message as "Elapsed time" from actlog where
nodename like 'TN%BR%' and msgno=4964 and date_time between '2000-04-17
18:00:00' and '2000-04-18 07:00:00' order by nodename


NODENAME                     MSGNO     Elapsed time
DATE_TIME
------------------     -----------     ------------------
------------------
------------------
TN5270-BR3200                 4964     ANE4964I Elapsed
TN5270-BR3200                 4964     ANE4964I Elapsed
2000-04-18
                                        processing time:
01:04:22.000000

                                        02:57:40

TN5271-BR3210                 4964     ANE4964I Elapsed
2000-04-18
                                        processing time:
00:10:55.000000

                                        02:04:42

What I want is this result:

 NODENAME                     MSGNO     Elapsed time
DATE_TIME
------------------     -----------     ------------------
------------------
------------------
TN5270-BR3200                 4964       02:57:40
TN5270-BR3200                 4964       02:57:40
2000-04-18

01:04:22.000000


TN5271-BR3210                 4964       02:04:42
2000-04-18

00:10:55.000000

 Can anyone tell me how to get this result.

___________________________________
Cynthia W. Ousley
IT Server Management, Birmingham
(205)801-0894  Fax(205)583-4518
cousley AT amsouth DOT com
<Prev in Thread] Current Thread [Next in Thread>