ADSM-L

SQL Query Question

2002-09-13 14:32:44
Subject: SQL Query Question
From: Michael Moore <Michael_Moore AT VFC DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Fri, 13 Sep 2002 14:31:15 -0400
Well,
Since I got an answer to my previous answer, it helped so much, now I have
an additional question(s).

I am pretty new at using SQL queries, so please bare with me..

Here is what I want to do:

I issue this command:
tsm: DSMSPTECH>run backup_stats CL01NAE0 2002-09-08

Script:
select -
  entity, -
  activity, -
  date(start_time) as "Start Date", -
  time(start_time) as "Start Time", -
  date(end_time) as "End Date", -
  time(end_time) as "End Time", -
  bytes, -
  mediaw  -
   from summary  -
     where date(start_time) = -
       '$2' and -
     activity='BACKUP' -
      and entity='$1' -
       order by entity

to get the following:

    ENTITY: CL01NAE0
  ACTIVITY: BACKUP
Start Date: 2002-09-08
Start Time: 08:14:44
  End Date: 2002-09-08
  End Time: 08:55:23
     BYTES: 4404051979
    MEDIAW: 100

    ENTITY: CL01NAE0
  ACTIVITY: BACKUP
Start Date: 2002-09-08
Start Time: 08:15:35
  End Date: 2002-09-08
  End Time: 08:59:42
     BYTES: 4978671627
    MEDIAW: 95

    ENTITY: CL01NAE0
  ACTIVITY: BACKUP
Start Date: 2002-09-08
Start Time: 09:32:02
  End Date: 2002-09-08
  End Time: 09:36:15
     BYTES: 1867811
    MEDIAW: 184

    ENTITY: CL01NAE0
  ACTIVITY: BACKUP
Start Date: 2002-09-08
Start Time: 09:32:02
  End Date: 2002-09-08
  End Time: 09:36:51
     BYTES: 1867811
    MEDIAW: 230

    ENTITY: CL01NAE0
  ACTIVITY: BACKUP
Start Date: 2002-09-08
Start Time: 18:01:02
  End Date: 2002-09-08
  End Time: 18:30:01
     BYTES: 11347080090
   MEDIAW: 100

As you can see, this node is backed up several times per day.  What I need
is a total number of bytes backed up for the day.  The other information in
the script is just there for testing at this time and another report I am
working on (wasted time on media waits).  In the end, I want a report that
looks similar to:

Entity             Date                 Bytes Backed Up
CL01NAE0    2002-09-08  2024528921481


Thanks for assistance!!


Michael Moore
VF Services Inc.
121 Smith Street
Greensboro,  NC  27420-1488

Voice: 336-332-4423
Fax: 336-332-4544

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