ADSM-L

Re: [ADSM-L] SQL query in v6 server

2013-11-20 11:15:54
Subject: Re: [ADSM-L] SQL query in v6 server
From: Ben Bullock <BBullock AT BCIDAHO DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Wed, 20 Nov 2013 16:13:42 +0000
I recently upgraded the server from 5.5 to 6.3.4 and am also working at 
changing out the failing scripts. Having to add a lot of cast statements to get 
the column formatting to be nicely formatted. The date arithmetic is also the 
one that has me the most  stymied. 

I have used the, "cast((current_timestamp-lastacc_time)days as decimal)" 
statement, but I also haven't found a workaround. 

Any enlightenment would be appreciated here also. ;-)

Thanks,
Ben

-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of 
Loon, EJ van - SPLXM
Sent: Wednesday, November 20, 2013 8:40 AM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: [ADSM-L] SQL query in v6 server

Hi TSM-ers!

We just migrated a second server to v6 and now I need to 'patch' TSM 
Operational Reporter. Among others, the following SQL statement no longer works:

 

select node_name, platform_name, date(lastacc_time) from nodes where 
cast((current_timestamp-lastacc_time)days as decimal) >=2 and contact like 
'Component Team Linux%%'

 

It must have something to do with the cast part, because when I leave that out 
it works fine.

I have a hard time finding the correct information about rewriting your SQL 
queries, so if somebody could help me out, I'll appreciate it!

Kind regards,

Eric van Loon

AF/KLM Storage Engineering

********************************************************
For information, services and offers, please visit our web site: 
https://urldefense.proofpoint.com/v1/url?u=http://www.klm.com/&k=Kv4nkNfjdxVgeJz6Pg57qw%3D%3D%0A&r=I1HLMFJ6m%2BiVcavWgCBtVd78uShy4GoDLiStkJAJ6wk%3D%0A&m=G9r2kCIrUOtvvigSp472sNCJ4VDABm3GAlVoP9E3%2Bls%3D%0A&s=65584791f33ccdc2e7085e6c09f287f08e5c7afceb3b4e8e2cef7303e2e05a1a.
 This e-mail and any attachment may contain confidential and privileged 
material intended for the addressee only. If you are not the addressee, you are 
notified that no part of the e-mail or any attachment may be disclosed, copied 
or distributed, and that any other action related to this e-mail or attachment 
is strictly prohibited, and may be unlawful. If you have received this e-mail 
by error, please notify the sender immediately by return e-mail, and delete 
this message.

Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries and/or its 
employees shall not be liable for the incorrect or incomplete transmission of 
this e-mail or any attachments, nor responsible for any delay in receipt.
Koninklijke Luchtvaart Maatschappij N.V. (also known as KLM Royal Dutch 
Airlines) is registered in Amstelveen, The Netherlands, with registered number 
33014286
********************************************************

----------------------------------------------------------------------
NOTICE: This email message is for the sole use of the intended recipient(s) and 
may contain confidential and privileged information. Any unauthorized review, 
use, disclosure or distribution is prohibited. If you are not the intended 
recipient, please contact the sender by reply email and destroy all copies of 
the original message.
Blue Cross of Idaho, 3000 E. Pine Ave, Meridian, ID 83642

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