...
where 年 + left('00'+cast(月 as varchar),2) between cmbYear1 + cmbMonth1 and cmbYear2 + cmbMonth2cmbMonth必须是两位,如:
'01'、'05'
where 年 + left('00'+cast(月 as varchar),2) between cmbYear1 + cmbMonth1 and cmbYear2 + cmbMonth2cmbMonth必须是两位,如:
'01'、'05'
解决方案 »
- 关于sql2005的超时问题
- insert into #tmp select * from open query(server2,'exec chage 2005, '@code) 怎样把变量加进去,老报错
- 连接数据库问题
- [来看]复杂sql查询
- 帮看看SQL语句怎么写?
- MSSQL 超大数据库 (2T) 文件组 备份 问题
- 对于自定义查询的输入信息的过滤,希望大家能列举出破坏生成正常SQL语句的非法和恶意字符,如单引号之类的。
- 关于SQL server一个大家都关心的问题
- sql是一种编程语言吗
- 怎样加快更新速度
- 如何將文件存到SQL Server中,然後從SQL Server中讀出寫到硬盤上?
- 关于sp_executesql返回值疑问,急
where
convert(datetime,right(10000+年,4)+right(100+月,2)+right(100+日,2))>=
convert(datetime,cmbYear1+'-'+cmbMonth1+'-'+'01')
and convert(datetime,right(10000+年,4)+right(100+月,2)+right(100+日,2))<
convert(datetime,cmbYear2+'-'+(1+cmbMonth2)+'-'+'01')