I have a query that creates the hours between dates and actual and projected points.
Data that is returned looks like
my query does a group by like this:
As you can see from the data at 11-10-2010 0:00:00.000 they both hit 100. However it grabbed 11-11.
Is there a way in a group by to grab the very first item instead of the very last item in a group by?
In this example I'd like it to have selected 11-10 instead of 11-11
- Matt
"If I must boast, I will boast of the things that show my weakness"
- Windows 2003 Server, 98 SE, XP
- VB.NET, VSTS 2010, ASP.NET, EXCEL VBA, ACCESS, SQL 2008
Data that is returned looks like
2010-11-09 20:00:00.000 97.799 96
2010-11-09 21:00:00.000 98.600 96
2010-11-09 22:00:00.000 99.301 96
2010-11-09 23:00:00.000 100.000 96
2010-11-11 08:00:00.000 100.000 100
my query does a group by like this:
Code:
GROUP BY POINT,ACTUAL_PCT
ORDER BY MIN(CYCLEDATE)
As you can see from the data at 11-10-2010 0:00:00.000 they both hit 100. However it grabbed 11-11.
Is there a way in a group by to grab the very first item instead of the very last item in a group by?
In this example I'd like it to have selected 11-10 instead of 11-11
- Matt
"If I must boast, I will boast of the things that show my weakness"
- Windows 2003 Server, 98 SE, XP
- VB.NET, VSTS 2010, ASP.NET, EXCEL VBA, ACCESS, SQL 2008