环境:VS2008+SQL2005字段:
start_num nchar(20) 由于字段里要保留0,因此字段类型设置为nchar
end_num nchar(20)数据:
start_num end_num
000351 000400
000401 000450
000451 000500
000501 000550
000551 000600
要求:查询start_num在000401和000501之间的数据,请问如何实现?谢谢
start_num nchar(20) 由于字段里要保留0,因此字段类型设置为nchar
end_num nchar(20)数据:
start_num end_num
000351 000400
000401 000450
000451 000500
000501 000550
000551 000600
要求:查询start_num在000401和000501之间的数据,请问如何实现?谢谢
解决方案 »
- .net
- 【急】ASPX页面中Bind方法的值替换的问题!
- sqlserver2005 的 MSSQLSERVER服务启动不起来,怎么办··???
- 老问题,textbox失去焦点时触发事件
- 将页面中处理的多行数据加载到 GridView 上
- asp.net与蜂鸣器
- asp.net自定义控件,怎样定义变量能够像Image控件的ImageUrl那样弹出一个选择图片的对话框
- 子窗口刷新父窗口问题,搞了几天了,分也全撒完了,大家都来看看
- ASP.NET如何统计网站访问量,同一IP在网页有效期内计数一次,求代码
- 为了这个问题(用Jmail接收邮件),我整整折腾了30*4天了,至今未搞定...
- 存储过程
- OutputCache中的VaryByControl获取客户端ID
create table #tb(start_num nchar(20),end_num nchar(20))
insert into #tb
select '000351','000400' union all
select '000401','000450' union all
select '000451','000500' union all
select '000501','000550' union all
select '000551','000600'select * from #tb where cast(start_num as int)>351 and cast(start_num as int)<501
/*
start_num end_num
---- -----
000401 000450
000451 000500
*/
select * from #tb where cast(start_num as int)>351 and cast(start_num as int)<501