|
Posted by Compliance on 08/17/06 20:31
Got it working now...I was retuening the DateTime data in the Select so
it was just giving me what I asked for.
Thanks Very Much Roy.
Compliance wrote:
> My mistake...thanks. Now I am getting the following back, but its not
> quite correct. See, unless I place the DateTime field in the GROUPBY I
> get an error:
>
> >[Error] Script lines: 1-9 --------------------------
> Column 'Date/Time' is invalid in the select list because it is not
> contained in either an aggregate function or the GROUP BY clause.
> >
>
> So when my data comes back i get the actual TimeDate and the new
> Hourly, but not the summarized hourly average (AvgData) alone:
>
> DateTime Hourly AvgData
> Name
> --------------------- ---------------------
> ------------------ ------------
> 7/25/2006 9:30:06 PM 7/25/2006 9:00:00 PM 82.80000 1Name
> 7/25/2006 9:32:03 PM 7/25/2006 9:00:00 PM 82.40000 1Name
> 7/25/2006 9:34:09 PM 7/25/2006 9:00:00 PM 82.09999 1TName
>
>
> Thanks again.
>
> Roy Harvey wrote:
> > On Thu, 17 Aug 2006 12:02:49 -0700, you wrote:
> >
> > > SELECT tblRecord.HistAt
> > > dateadd(hour,datediff(hour,0,HistAt),0) as Hourly,
> > On Thu, 17 Aug 2006 12:02:49 -0700, "Compliance" <comcontrol@aol.com>
> > wrote:
> >
> > > SELECT tblRecord.HistAt
> > > dateadd(hour,datediff(hour,0,HistAt),0) as Hourly,
> >
> > There is a comma missing at the end of the first line.
> >
> > Roy Harvey
> > Beacon Falls, CT
[Back to original message]
|