如何按卡兰德明智地排序月份
问题描述:
我想根据日历对表格中的月份进行排序,任何人都可以帮忙
但该列是varchar格式,而不是datetime
就像
一月
二月
三月
.
.
.
.
.
i would like to sort month from table according to calendar wise can anyone help
but the column is varchar format not datetime
like
January
February
March
.
.
.
.
.
答
尝试:
SELECT * FROM MyTable WHERE DATEPART(month, myDateColumn)=5
首先选择您的列,并写一个案例,如果它是jan set 1,feb-2 ...然后,您可以根据该键值进行排序.
我不确定是否会成功.
First select your column and write a case that if it is jan set 1,feb-2.... Then according to that key value you can sort.
I don''t know confirmly whether it will work out.
阿南德,
我在这里回答过:
如何按月对calander进行排序 [ ^ ]
快乐编码:)
Hi Anand,
I''ve answered this here:
how to sort month by calander wise[^]
Happy Coding :)