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 |
vipinjha123
Starting Member
45 Posts |
Posted - 2012-06-11 : 06:52:46
|
daer All,i am using left(DATEname(mm,EMP_DATEOFJOINING),3)+'-'+right(convert(varchar,DATEPART(yy,EMP_DATEOFJOINING)),2) "Month-Year"for Month-yearbut i ma unable to sirt this month-year.plesae let me kno the best way for sameregards,Vipin jha |
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2012-06-11 : 07:07:56
|
Sort using numeric values of year and month, as in:ORDER BY YEAR(EMP_DATEOFJOINING), MONTH(EMP_DATEOFJOINING); |
 |
|
|
|
|