March 1, 2012 at 2:23 pm
Hello,
I am currently collecting weather data that we subscribe to. The temperature are posted in 15 minute intervals. I would like to collect the data but also store them as a single averaged value once I see the 4 interval.
Here is the structure of the file:
DATE | Hour | Interval | City | City Attribute | DST
Example of one line:
3/1/2012 12 4 Wilmington | DE | N
When the interval is 4, that means I have seen the entire hour and I would like to query this 15 minute data and store them as hourly averages. Each file has about 50 cities. I combine the Date, Hour, and interval into one value for my target table:
3/1/2010 12:45, Wilmington, DE, N
How could I these values into grouped hourly values so I can store them into another table? Thanks for the help and please feel free for me to elaborate more!
-ATC
March 1, 2012 at 3:11 pm
atchristian, please have a look at the following article to follow the forum etiquettes : http://www.sqlservercentral.com/articles/Best+Practices/61537/.
We need to get more info on effectively give you an answer.
You requirement may partially be addressed by using GROUP BY DATEPART(Hour ,'YourDate' )
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply