在 SQL Server 2005 中选择具有特定月份和年份的记录
我想列出特定月份和年份的记录。表名称为“到达”,“日期”是存储添加记录的日期的字段。这是通过 C# 应用程序完成的。例如,如果用户在应用程序中选择月份为“4 月”,年份为“2009 年”,则会列出 2009 年 4 月添加的所有记录。 (我只需要查询,希望我能弄清楚其余的:))
I want to list records with a particular month and year. The table name is 'Arrival' and 'date' is the field that stores the date that the record was added. This is to be done from a C# application. For example, if the user selects month as 'April' and year as '2009' in the application, it will list all the records that were added on April,2009. (I only need the query, hope I can figure out the rest :) )
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
创建一个将月份和年份输入作为 int 的存储过程可能是最简单的。
身体会是这样的:
Probably easiest to create a stored procedure that takes Month and Year inputs as int.
The body would be something like this: