一条SQL语句出错:服务器: 消息 8114,级别 16,状态 5,过程 JIEGUO33,行 14,将数据类型 varchar 转换为 float 时出错。
一条SQL语句出错:服务器:
消息 8114,级别 16,状态 5,过程 JIEGUO33,行 14
将数据类型 varchar 转换为 float 时出错。
存储过程:
CREATE PROCEDURE JIEGUO33
AS
select count(*) zcount,usernumber from sm_report where ISNUMERIC(usernumber)=1 and
cast(usernumber as float) in(select distinct usermobile from agent.dbo.smsorder
where isorder=1 and sp=0 and usermobile>0 )
group by usernumber order by usernumber
GO
其中
sm_report中字段usernumber为VARCHAR(11)
agent.dbo.smsorder中字段usermobile为FLOAT
请帮我看看是怎么回事,按道理我用ISNUMERIC(usernumber)=1已经排除不能转为FLOAT的值了,但还是说将数据类型 varchar 转换为 float 时出错