ADSM-L

Re: SQL Help

2004-11-30 09:09:12
Subject: Re: SQL Help
From: "Stapleton, Mark" <mark.stapleton AT BERBEE DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Tue, 30 Nov 2004 08:09:03 -0600
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] 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:
>   ANR2904E Unexpected SQL key word token - 'DATE'.
>pointing to the date in the group by clause.
>
>Anyone know how to get a pending count by date?

Try

  select date(pending_date) as "Date",count(*) from volumes where
status='PENDING' group by "Date"

--
Mark Stapleton (stapleton AT berbee DOT com)
Berbee Information Networks
Office 262.521.5627  

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