select * from table
where a >='1999' and b>='4'and a <='2000' and b<='9'
where a >='1999' and b>='4'and a <='2000' and b<='9'
解决方案 »
- sql server bak 还原时找不到mdf
- 关于使用JOIN的问题
- **************请问关于内存设置的问题*********
- 为什么有错 ??? 必须声明变量 '@myTable'。
- exec 后面加的不是存储过程是什么意思啊?
- 为什么有一台机子可以连上 SQL Server 7.0 ,却连不上 SQL Server 2000 ?
- 怎样写这样的统计语句????
- 找出一个星期之内生日用户
- 如何用VFP3.0(在WIN3.2 或 WIN98下)的 say 语句实现打印机的立即打印
- 特棘手的update问题,请大家帮我看看!!!
- 一个select语句,帮一下
- 使用“存储过程”怎么样将指定数据生成为XML文件,然后保存在硬盘里???
where (a ='1999' and b >='4') or (a ='2000' and b<='9')
Set @Date1='1999-04-01'
Set @date2='2000-09-01'
Select * from 表 where Cast(A as Char(4))+Cast(B as Char(2))
=Cast(DatePart(Year,@Date1) as Char(4))
+Cast(DatePart(Month,@Date1)) as Char(2)) Or
Cast(A as Char(4))+Cast(B as Char(2))
=Cast(DatePart(Year,@Date2) as Char(4))
+Cast(DatePart(Month,@Date2)) as Char(2))
Select * from 表 where Cast(a as Char(4))+Cast(b as Char(2)>='19994' and Cast(a as Char(4))+Cast(b as Char(2))<='20009'
where a >=1999 and b>=4and a <=2000 and b<=9
这样不行,有12个月呢
select @arg1 = 199904,@arg2 = 200309select * from tablename where (a*100 + b) between @arg1 and @arg2