|
Posted by Compliance on 08/17/06 18:24
Roy:
Thanks for the reply! I have run this and am getting a syntax error on
the second line which says there is incorrect syntax near the '(' . I
played with spacing but could not resolve. Do you have any tips?
Also, is it inappropriate
Roy Harvey wrote:
> I believe this will do it.
>
> SELECT Location,
> dateadd(hour,datediff(hour,0,TimeDate),0) as Hourly,
> avg(Data) as AvgData
> FROM .....
> GROUP BY
> Location,
> dateadd(hour,datediff(hour,0,TimeDate),0)
>
> Roy Harvey
> Beacon Falls, CT
>
> On 17 Aug 2006 09:31:32 -0700, "Compliance" <comcontrol@aol.com>
> wrote:
>
> >Apologies for the simplicity of the question, but it reflects my
> >capabilities! I have the following sample fields coming from different
> >tables:
> >
> >Location
> >TimeDate (timestamp)
> >Data
> >
> >I need to return the average of Data per Location per HOUR.
> >
> >Thanks.
Navigation:
[Reply to this message]
|