ADSM-L

Re: [ADSM-L] Syntax of select statement

2009-08-05 14:02:20
Subject: Re: [ADSM-L] Syntax of select statement
From: "Moyer, Joni M" <joni.moyer AT HIGHMARK DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Wed, 5 Aug 2009 14:00:52 -0400
Hi Margaret,

That worked perfectly!  Thank you so much!  I really appreciate the help!

-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of 
Clark, Margaret
Sent: Wednesday, August 05, 2009 1:37 PM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: Syntax of select statement

You could try replacing "date(backup_end) <= current_date -2 days"  with 
"cast((current_timestamp-backup_end)days as decimal)<2"  - Margaret Clark

-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of 
Moyer, Joni M
Sent: Wednesday, August 05, 2009 6:27 AM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: [ADSM-L] Syntax of select statement

Hi Everyone,

I'm having some issues getting a script to output into an email as I would like 
it to and I'm not quite seeing what I am doing wrong.  I am running the 
following:

select node_name as "Server             ", filespace_name as "Possible failed 
File System  ", substr(char(backup_start),1,16) as 
backup_start,substr(char(backup_end),1,16) as backup_end from FILESPACES  where 
(node_name like 'HMCH%' or node_name like 'HMPG' or node_name like 'FAX%' or 
node_name like 'OCS%' or node_name like 'OPM%' or node_name like 'QNM%' or 
node_name like 'SEV%' or node_name like 'SQL%' or node_name like 'DOC%' or 
node_name like 'W%' or node_name like 'E%') and date(backup_end) <= 
current_date -2 days

and it is giving me the output of:


ANS8000I Server command: 'run windows_missed_backups'

EMC-LS      SYSTEM SERVICES   2009-02-22 01:29  2009-02-22 01:29

EMC-LS      SYSTEM STATE      2009-02-22 00:45  2009-02-20 23:32

EMC-LS      \\nasdx1\c$<file:///\\nasdx1\c$> 2007-12-17 23:02  2007-12-17 23:03

EMEETINGS   \\hmch1199\d$<file:///\\hmch1199\d$>     2005-09-01 14:43  
2005-09-01 14:43

EMEETINGS   \\hmch1199\e$<file:///\\hmch1199\e$>     2005-09-01 14:43  
2005-09-01 14:43

ENVISION    \\ni-highmark-ha\e$<file:///\\ni-highmark-ha\e$>     2008-10-06 
13:38  2008-10-06 13:39

EXCA1 EXCA1\SystemState\NULL\System State\SystemState 2009-08-05 02:49  
2009-08-03 01:15

EXCA1 \\exca1\c$<file:///\\exca1\c$>  2009-08-03 01:14  2009-08-03 01:16

EXCA1 \\exca1\d$<file:///\\exca1\d$>  2009-08-03 01:16  2009-08-03 01:17

EXCA2 EXCA2\SystemState\NULL\System State\SystemState 2009-07-24 04:07  
2009-07-24 06:06

EXCA2 \\exca2\c$<file:///\\exca2\c$>  2009-07-25 01:44  2009-07-25 01:48

EXCA2 \\exca2\d$<file:///\\exca2\d$>  2009-07-25 01:43  2009-07-25 01:44

EXHT1 EXHT1\SystemState\NULL\System State\SystemState 2009-08-03 03:40  
2009-07-24 05:25

EXHT1 \\exht1\c$<file:///\\exht1\c$>  2009-07-24 05:26  2009-07-24 05:29

but I would like for it to appear as follows:

Server                   File System                         Start Date         
                   End Date

EMC-LS      SYSTEM SERVICES   2009-02-22 01:29  2009-02-22 01:29

EMC-LS      SYSTEM STATE      2009-02-22 00:45  2009-02-20 23:32

EMC-LS      \\nasdx1\c$<file:///\\nasdx1\c$>       2007-12-17 23:02  2007-12-17 
23:03

If anyone has any suggestion on how I can fix this I would really appreciate it 
a lot!!!  Thanks in advance!

Joni Moyer
Storage Administrator III
(717)302-9966
joni.moyer AT highmark DOT com


________________________________
This e-mail and any attachments to it are confidential and are intended solely 
for use of the individual or entity to whom they are addressed. If you have 
received this e-mail in error, please notify the sender immediately and then 
delete it. If you are not the intended recipient, you must not keep, use, 
disclose, copy or distribute this e-mail without the author's prior permission. 
The views expressed in this e-mail message do not necessarily represent the 
views of Highmark Inc., its subsidiaries, or affiliates.


This e-mail and any attachments to it are confidential and are intended solely 
for use of the individual or entity to whom they are addressed.  If you have 
received this e-mail in error, please notify the sender immediately and then 
delete it.  If you are not the intended recipient, you must not keep, use, 
disclose, copy or distribute this e-mail without the author's prior permission. 
 The views expressed in this e-mail message do not necessarily represent the 
views of Highmark Inc., its subsidiaries, or affiliates.

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