Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Ex
Posting Yak Master
166 Posts |
Posted - 2005-01-19 : 19:54:02
|
| hey all i know this is such a easy question but just having a mental blanki have a table like sodate time flow 1/1 1:30 5 1/1 1:45 10 1/1 2:00 4 1/1 2:15 8 1/1 2:30 12 etc etc etc and i want to do a normal SELECT sql query(if possible)grouping by date then hourlike soand would return date time flow1/1....1.....7.5 1/1....2...... 8 i would like this query to go over serveral databases if this is possible great if TSQL is required then no worriesthanks |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2005-01-19 : 20:13:08
|
| select date, time = datepart(hh,time), flow = avg(flow)from tblgroup by date, datepart(hh,time)order by date, datepart(hh,time)==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|