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 |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-07-27 : 10:15:11
|
carl writes "I want to group records by year and ignore the month and day. I know I can add an SQLformat statement at the end of the SQL statement but I don't remember what it is. Belowis the SQL statement and the listing that it creates. (Access 97).DateClass SumOfEstCost CountOfEmplName SumOfEstHours ID1/7/99 1 2 21641/7/99 1 2 53412/21/98 $155.00 1 8 75912/14/98 1 8 52412/14/98 1 7 523 SELECT ClassHistory.DateClass, Sum(ClassHistory.EstCost) AS SumOfEstCost, Count(ClassHistory.EmplName) AS CountOfEmplName, Sum(ClassHistory.EstHours) AS SumOfEstHours, ClassHistory.IDFROM ClassHistoryGROUP BY ClassHistory.DateClass, ClassHistory.IDORDER BY ClassHistory.DateClass DESC;" |
|
|
|
|