Re: sql help - v5 to v6 syntax

2013-10-03 Thread Remco Post
check http://www.ibm.com/developerworks/data/library/techarticle/0211yip/0211yip3.html and the db2 function timestampdiff() Op 3 okt. 2013, om 14:31 heeft Richard Rhodes het volgende geschreven: > A puzzle for a true db2/sql type person who would like to tackle a v5 to > v6 sql problem . . .

sql help - v5 to v6 syntax

2013-10-03 Thread Richard Rhodes
A puzzle for a true db2/sql type person who would like to tackle a v5 to v6 sql problem . . . This does not work on v6. I've played with it for quite some time and can't come up with a v6 version. This is an attempt to identify slow backups that may need attention. These are backup sessions that

Re: TSM v5 SQL help

2010-11-18 Thread Shawn Drew
13 AM Please respond to ADSM-L@VM.MARIST.EDU To ADSM-L cc Subject [ADSM-L] TSM v5 SQL help The following script worked at TSM v5.5.3.0: Q_OFFLINE 1 select cast(drives.library_name as char(6)) as "LIB", - 5 cast(drives.drive_name as char(10)) as "DRIV

Re: TSM v5 SQL help

2010-11-18 Thread Richard Sims
http://www.mail-archive.com/adsm-l@vm.marist.edu/msg87986.html

Re: TSM v5 SQL help

2010-11-18 Thread Prather, Wanda
http://www-01.ibm.com/support/docview.wss?uid=swg1PM24818 -Original Message- From: ADSM: Dist Stor Manager [mailto:ads...@vm.marist.edu] On Behalf Of Prather, Wanda Sent: Thursday, November 18, 2010 10:19 AM To: ADSM-L@VM.MARIST.EDU Subject: Re: [ADSM-L] TSM v5 SQL help -Original

Re: TSM v5 SQL help

2010-11-18 Thread Prather, Wanda
-Original Message- From: ADSM: Dist Stor Manager [mailto:ads...@vm.marist.edu] On Behalf Of David E Ehresman Sent: Thursday, November 18, 2010 10:14 AM To: ADSM-L@VM.MARIST.EDU Subject: [ADSM-L] TSM v5 SQL help The following script worked at TSM v5.5.3.0: Q_OFFLINE 1 select cast

TSM v5 SQL help

2010-11-18 Thread David E Ehresman
The following script worked at TSM v5.5.3.0: Q_OFFLINE 1 select cast(drives.library_name as char(6)) as "LIB", - 5 cast(drives.drive_name as char(10)) as "DRIVE", - 10 cast(source_name as char(15)) as "PATH", - 15 cast(drives.online as char(

Re: SQL help

2009-10-21 Thread Fred Johanson
Thank you all, Remco got it. -Original Message- From: ADSM: Dist Stor Manager [mailto:ads...@vm.marist.edu] On Behalf Of Remco Post Sent: Wednesday, October 21, 2009 3:39 PM To: ADSM-L@VM.MARIST.EDU Subject: Re: [ADSM-L] SQL help On 21 okt 2009, at 21:25, Fred Johanson wrote

Re: SQL help

2009-10-21 Thread Remco Post
On 21 okt 2009, at 21:25, Fred Johanson wrote: Management want to count the number of nodes added in the last 2 months. I think this is what they want, but it returns 0 select count(node_name) from nodes where (cast((date(reg_time)- current_date)days as decimal) <= 60) select count(*) from

SQL help

2009-10-21 Thread Fred Johanson
Management want to count the number of nodes added in the last 2 months. I think this is what they want, but it returns 0 select count(node_name) from nodes where (cast((date(reg_time)-current_date)days as decimal) <= 60) What did I do wrong?

Re: SQL Help

2006-11-28 Thread Fred Johanson
Thanks, Andy. that did it. Original message >Date: Mon, 27 Nov 2006 16:07:45 -0700 >From: Andrew Raibeck <[EMAIL PROTECTED]> >Subject: Re: [ADSM-L] SQL Help >To: ADSM-L@VM.MARIST.EDU > >Add another criterion to the WHERE clause comparing NODES.DOMAIN_N

Re: SQL Help

2006-11-27 Thread Andrew Raibeck
Add another criterion to the WHERE clause comparing NODES.DOMAIN_NAME to the desired name (... and nodes.domain_name='x' ...). Regards, Andy Andy Raibeck IBM Software Group Tivoli Storage Manager Client Development Internal Notes e-mail: Andrew Raibeck/Tucson/[EMAIL PROTECTED] Internet e-mai

Re: SQL Help

2006-11-27 Thread fred johanson
Thanks Andy. I tried that at one point but still I need to do this by individual domains. At 01:58 PM 11/27/2006 -0700, you wrote: I don't think the criteria for getting auditocc info for the node names is quite right. Try this: select nodes.node_name as "Client_Name", \ date(nodes.las

Re: SQL Help

2006-11-27 Thread Andrew Raibeck
I don't think the criteria for getting auditocc info for the node names is quite right. Try this: select nodes.node_name as "Client_Name", \ date(nodes.lastacc_time) as "Last Access", \ auditocc.total_mb as "Total Storage" \ from nodes, auditocc \ where nodes.node_name = audito

SQL Help

2006-11-27 Thread fred johanson
I'm trying to generate a report for storage abusers, just three columns: Client Name Last Access Total Storage This is the SQL statement That comes close: select distinct(nodes.node_name) as "Client Name",date(nodes.lastacc_time) as "Last Access" ,auditocc.total_mb as "Total Stora

Re: SQL Help

2006-06-07 Thread Bill Dourado
cc: Subject: Re: [ADSM-L] SQL Help See if you can use parts from this one.. Select Node_name, FILESPACE_NAME, LL_NAME, state, substr(cast(BACKUP_DATE as char(26)),1,10) as "BACKUP_DATE" from backups where node_name='STO-W24-TDP' and filespace_name=&

Re: SQL Help

2006-06-05 Thread Henrik Wahlstedt
ackup_date)days as integer) <3 //Henrik -Original Message- From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] On Behalf Of Bill Dourado Sent: den 5 juni 2006 12:05 To: ADSM-L@VM.MARIST.EDU Subject: SQL Help Importance: High Hi, What do I need to add to this SQL statement, to only

Re: SQL Help

2006-06-05 Thread Choudarapu, Ramakrishna (GTI)
AIL PROTECTED] On Behalf Of Bill Dourado Sent: Monday, June 05, 2006 6:05 AM To: ADSM-L@VM.MARIST.EDU Subject: [ADSM-L] SQL Help Importance: High Hi, What do I need to add to this SQL statement, to only list backups done in the last 3 days ? select * from backups where node_name = 

Re: SQL Help

2006-06-05 Thread Henrik Wahlstedt
select, "...from backups where node_name='STO-W24-TDP' and filespace_name='STO-LNS01.DOMLOGS'..." //Henrik -Original Message- From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] On Behalf Of Bill Dourado Sent: den 5 juni 2006 12:05 To: ADSM-L@V

SQL Help

2006-06-05 Thread Bill Dourado
Hi, What do I need to add to this SQL statement, to only list backups done in the last 3 days ? select * from backups where node_name = 'DOCCM_DB2' I have had several unsuccessful attempts . Thanks in Advance. Bill *** Disclaimer ***

Re: SQL Help

2005-11-14 Thread Prather, Wanda
lto:[EMAIL PROTECTED] On Behalf Of Muthukumar Kannaiyan Sent: Monday, November 14, 2005 10:08 AM To: ADSM-L@VM.MARIST.EDU Subject: SQL Help I am executing following sql statement in web GUI. I want output to be in column/row format whereas I get each column in separate line. I tried "Set sqld

Re: SQL Help

2005-11-14 Thread Richard Sims
On Nov 14, 2005, at 10:08 AM, Muthukumar Kannaiyan wrote: I am executing following sql statement in web GUI. I want output to be in column/row format whereas I get each column in separate line. I tried "Set sqldisplaymode wide", but no use. Any idea!!! select hl_name as "Directory Name.

SQL Help

2005-11-14 Thread Muthukumar Kannaiyan
I am executing following sql statement in web GUI. I want output to be in column/row format whereas I get each column in separate line. I tried "Set sqldisplaymode wide", but no use. Any idea!!! select hl_name as "Directory Name..",ll_name "File Name

Re: SQL Help

2004-12-07 Thread Warren, Matthew (Retail)
and cast((current_timestamp-PENDING_DATE)days as decimal)<=5 group by stgpool_name,devclass_name Matt. _-'-_ -|- -Original Message- From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] On Behalf Of Prather, Wanda Sent: Wednesday, December 01, 2004 5:40 PM To: [EMAIL PROT

Re: SQL Help

2004-12-01 Thread Andrew Raibeck
:[EMAIL PROTECTED] On Behalf Of > Andrew Raibeck > Sent: Wednesday, December 01, 2004 10:37 AM > To: [EMAIL PROTECTED] > Subject: Re: SQL Help > > > Try adding the DISTINCT keyword between SELECT and DATE(PENDING_DATE), > i.e. > >select distinct date(pending_date) .

Re: SQL Help

2004-12-01 Thread Prather, Wanda
age- From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Raibeck Sent: Wednesday, December 01, 2004 10:37 AM To: [EMAIL PROTECTED] Subject: Re: SQL Help Try adding the DISTINCT keyword between SELECT and DATE(PENDING_DATE), i.e. select distinct date(pending_date) .

Re: SQL Help

2004-12-01 Thread Andrew Raibeck
Try adding the DISTINCT keyword between SELECT and DATE(PENDING_DATE), i.e. select distinct date(pending_date) ... You'll want to verify that the results are correct by matching up the counts against the results of the select without DISTINCT. For example, using the output you show below, I'd

Re: SQL Help

2004-12-01 Thread David E Ehresman
That does not give me the desired results: tsm: ULTSM> select date(pending_date) as "Date",count(*) from volumes where - cont> status='PENDING' group by pending_date Date Unnamed[2] -- --- 2004-11-27 1 2004-11-27 1 2004-11-27

Re: SQL Help

2004-12-01 Thread Curtis Stewart
Sent by: "ADSM: Dist Stor Manager" <[EMAIL PROTECTED]> 12/01/2004 09:02 AM Please respond to "ADSM: Dist Stor Manager" <[EMAIL PROTECTED]> To [EMAIL PROTECTED] cc Subject Re: SQL Help The group by statement is incorrect, use the following: group by pending_da

Re: SQL Help

2004-12-01 Thread Gretchen L. Thiele
The group by statement is incorrect, use the following: group by pending_date the conversion to date format is already taken care of in the first part of the select statement. David E Ehresman wrote: tsm: ULTSM> select date(pending_date) as "Date",count(*) from volumes where - cont> status='PENDING

Re: SQL Help

2004-12-01 Thread Curtis Stewart
Try using capital letters. [EMAIL PROTECTED] David E Ehresman <[EMAIL PROTECTED]> Sent by: "ADSM: Dist Stor Manager" <[EMAIL PROTECTED]> 12/01/2004 08:54 AM Please respond to "ADSM: Dist Stor Manager" <[EMAIL PROTECTED]> To [EMAIL PROTECTED] cc Subject

Re: SQL Help

2004-12-01 Thread David E Ehresman
tsm: ULTSM> select date(pending_date) as "Date",count(*) from volumes where - cont> status='PENDING' group by "Date" ANR2940E The reference 'Date' is an unknown SQL column name. | ...

Re: SQL Help

2004-11-30 Thread Stapleton, Mark
From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] On Behalf Of David E Ehresman >I'm trying to get a count of tapes pending by date. I'm using: >select date(pending_date),count(*) from volumes where >status='PENDING' - > group by date(pending_date) >but I get the error message: >

Re: SQL Help

2004-11-30 Thread David E Ehresman
s='PENDING' - group by pending_date From: ADSM: Dist Stor Manager on behalf of David E Ehresman Sent: Tue 11/30/2004 6:10 AM To: [EMAIL PROTECTED] Subject: SQL Help I'm trying to get a count of tapes pending by date. I'm using:

Re: SQL Help

2004-11-30 Thread James Choate
Try this. select date(pending_date), count(*) from volumes where - status='PENDING' - group by pending_date From: ADSM: Dist Stor Manager on behalf of David E Ehresman Sent: Tue 11/30/2004 6:10 AM To: [EMAIL PROTECTED] Subject: SQL Help I'

SQL Help

2004-11-30 Thread David E Ehresman
I'm trying to get a count of tapes pending by date. I'm using: select date(pending_date),count(*) from volumes where status='PENDING' - group by date(pending_date) but I get the error message: ANR2904E Unexpected SQL key word token - 'DATE'. pointing to the date in the group by claus

Re: sql help

2003-08-14 Thread Richard Sims
>I have a primary tape pool tape that has gone missing. Is there anyway >to determine if all/some/none of the files that were on the primary tape >have already been copied to the copy pool? That can be like the conclusion of an operation where the surgeon cannot account for a sponge or tool. It'

sql help

2003-08-14 Thread David E Ehresman
I have a primary tape pool tape that has gone missing. Is there anyway to determine if all/some/none of the files that were on the primary tape have already been copied to the copy pool? David

Re: sql help

2003-08-14 Thread Hooft, Jeroen
Mark it as destroyed and do a "restore stg PRIMARY_POOL preview=yes wait=yes" -Original Message- From: David E Ehresman [mailto:[EMAIL PROTECTED] Sent: 14 August 2003 18:48 To: [EMAIL PROTECTED] Subject: sql help I have a primary tape pool tape that has gone missing. Is th

Re: sql help

2003-08-14 Thread Richard Sims
>Oh believe me, we're doing an exhausive search. I just want to know >what the damages are if we can't find it. The good news is all the data >is in the offsite pool. The bad news is that it would take 65 >non-collocated tapes to recover this one collocated tape! David - One of those handy alte

Re: sql help

2003-08-14 Thread David E Ehresman
>That can be like the conclusion of an operation where the surgeon cannot >account for a sponge or tool. It's best to check for the tape being >stuck in a drive, dropped inside the library, or other expeditionary >search. > Oh believe me, we're doing an exhausive search. I just want to know what

Re: sql help

2003-08-14 Thread Stapleton, Mark
From: David E Ehresman [mailto:[EMAIL PROTECTED] > I have a primary tape pool tape that has gone missing. Is > there anyway > to determine if all/some/none of the files that were on the > primary tape have already been copied to the copy pool? You can run backup stg preview=yes to

Re: SQL Help

2001-02-04 Thread Suad Musovich
> UPDATE SCRIPT Q_NODE_OCCUPANCY4 ' (select distinct count(volume_name) from >volumeusage where occupancy.node_name = volumeusage.node_name) as NUMBER_OF_TAPES -' Haven't figured it out yet, but your sub-query is incorrect. You want; select count(distinct volume_name) from Cheers, Su

SQL Help

2001-02-04 Thread Andrew Webster
Hi All, Are there any SQL gurus you can help me out here? I'm trying to write a script that prints NODE_NAME, TOTAL_GIGABYTES, NUMBER_OF_FILES and TOTAL_TAPES all in one line. Here is what I have so far:- UPDATE SCRIPT Q_NODE_OCCUPANCY4 'select -' UPDATE SCRIPT Q_NODE_OCCUPANCY