Wednesday, August 27, 2008

sql server how to order by month,date


Order By Month

SELECT Emp_Name,CONVERT(varchar(11),DOB,113) as DOB FROM CV_DOB order By MONTH(DOB)


Order By Date

SELECT Emp_Name,CONVERT(varchar(11),DOB,113) as DOB FROM CV_DOB order By DAY(DOB)



No comments:

Creative Commons License
Disclaimers:We have tried hard to provide accurate information, as a user, you agree that you bear sole responsibility for your own decisions to use any programs, documents, source code, tips, articles or any other information provided on this Blog.