如何按卡兰德明智地排序月份 [英] how to sort month by calander wise

查看:92
本文介绍了如何按卡兰德明智地排序月份的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想根据日历对表格中的月份进行排序,任何人都可以帮忙
但该列是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 :)


这篇关于如何按卡兰德明智地排序月份的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆