谢谢!~~但又出了点问题,呵呵错误: varchar 值 '11212131233' 的转换溢出了 int 列。超出了最大整数值。怎么转换成long型的呀?
select convert(bigint ,'11212131233')
select convert(float ,'11212131233')
create table test( num varchar(20) ) insert into test select '1000' union all select '2000' union all select '2020' union all select '1千' union all select '112232132212' select * from test where isnumeric(num)=1 and cast(num as bigint) between 1000 and 3000 drop table test
varchar 值 '11212131233' 的转换溢出了 int 列。超出了最大整数值。怎么转换成long型的呀?
num varchar(20)
)
insert into test
select '1000' union all select '2000' union all select '2020' union all select '1千' union all select '112232132212'
select * from test
where isnumeric(num)=1 and cast(num as bigint) between 1000 and 3000
drop table test