34,575
社区成员
发帖
与我相关
我的任务
分享
alter table tbname alter column colname float
create function dbo.f_ntof(
@n nvarchar(100)
)
returns float
as
begin
return (case when isnumeric(@n)=1 then convert(float,@n) else null end)
end
go
select dbo.f_ntof('xx'),dbo.f_ntof('20.3');