Hello, I'm having some problems writing what I am sure you will think is a simple query!I have a table which has numbers in it which have two columns making them unique. All I want to do is update a further column in the same table with the average of these numbers.So the table has something like this:Day - Monday, Tuesday, Wednesday etcHour - 0, 1, 2 etcQuarter - 1, 2, 3, 4PCTotal - The numbers to get the average fromPCAverage - Hopefully to be updated!The following query returns the results I want, but I can't seem to make this work as part of the update.
SELECT [Hour], Quarter, AVG(PCTotal) AS Expr1FROM tblUptime WHERE ([Day] <> 'XXX')GROUP BY [Hour], Quarter
This is only to be run nightly as a maintenance routine over approximately 900 records, so it doesn't even need to be very elegant.I'm obviously not an SQL programmer, and only use it for interfacing to vb.net via stored procedures to display information on a website. I've found this site pretty useful in the past so thought I would try a post.Any help would be appreciated and gratefully received.ThanksLiz