ADSM-L

Re: SQL Help

2004-12-01 10:11:00
Subject: Re: SQL Help
From: Curtis Stewart <Curtis.Stewart AT LAWSON DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Wed, 1 Dec 2004 09:10:44 -0600
I guess if I'd read the entire e-mail, instead of assuming I knew what the
problem was from the error, I'd have seen he was using caps for the where
clause. Oh well, no coffee yet today. Good eye Gretchen.

curtis.stewart AT lawson DOT com



"Gretchen L. Thiele" <gretchen AT PRINCETON DOT EDU>
Sent by: "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>
12/01/2004 09:02 AM
Please respond to
"ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>


To
ADSM-L AT VM.MARIST DOT EDU
cc

Subject
Re: SQL Help






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' group by "Date"
> ANR2940E The reference 'Date' is an unknown SQL column name.
>
>                                                                   |
>
> .........................................................V.....
>          e",count(*) from volumes where status='PENDING' group by
> "Date"
>
> ANS8001I Return code 3.
>
>
>
>>>>mark.stapleton AT BERBEE DOT COM 11/30/2004 9:09:03 AM >>>
>
> 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>