I have a query which returns a result set like this:
Proj | release | releaseDt
1 | 2 | 1/2/2013
1 | 1 | 4/5/2012
2 | 1 | [null]
3 | 1 | 22/2/2013
1 | 3 | [null]
3 | 2 | [null]
I need to sort this by releaseDt
, but I need to have all the records for that Proj
together.
After sorting, the result should be something like this:
Proj | release | releaseDt
1 | 2 | 1/2/2013
1 | 1 | 4/5/2012
1 | 3 | [null]
3 | 1 | 22/2/2013
3 | 2 | [null]
2 | 1 | [null]
How can I do this with SQL Server?