any workarounds if need to group them by the date only portion of
the timestamp.
On Tue, Mar 16, 2010 at 2:02 PM, Grigori Solonovitch <G.Solonovitch AT bkme DOT
com
> wrote:
> You should not use function date in "group by". So try:
> select start_time, sum(bytes)
> from
> summary
> where
> ACTIVITY in ('BACKUP','RESTORE')
> group by start_time
>
>
> ________________________________________
> From: ADSM: Dist Stor Manager [ADSM-L AT VM.MARIST DOT EDU] On Behalf Of yoda
> woya [yodawoya AT GMAIL DOT COM]
> Sent: Tuesday, March 16, 2010 8:15 PM
> To: ADSM-L AT VM.MARIST DOT EDU
> Subject: [ADSM-L] issue with sql syntax in TSM database
>
> I am trying to run this sql and cannot get a result
>
> select date(start_time), sum(bytes)
>
> from
> summary
>
> where
> ACTIVITY = 'BACKUP'
> or ACTIVITY = 'RESTORE'
>
> group by date(start_time)
>
>
> any reasons why??
>
> Please consider the environment before printing this Email.
>
> "This email message and any attachments transmitted with it may contain
> confidential and proprietary information, intended only for the named
> recipient(s). If you have received this message in error, or if you are not
> the named recipient(s), please delete this email after notifying the sender
> immediately. BKME cannot guarantee the integrity of this communication and
> accepts no liability for any damage caused by this email or its attachments
> due to viruses, any other defects, interception or unauthorized
> modification. The information, views, opinions and comments of this message
> are those of the individual and not necessarily endorsed by BKME."
>
|