嘿,我正在尝试将数据类型从varchar转换为列名'identification'的float。下面是我创建的查询,它们都抛出了错误
Select distinct Convert(float,(Replace([Identification], '-',''))) FROM [A]
where identification is NOT Null;
Select Cast(Replace([Identification], '-','') AS FLOAT) FROM [A]
where identification is NOT Null;
错误消息:
消息8114,16级,状态5,行1
将数据类型varchar转换为float时出错。
2条答案
按热度按时间ffvjumwh1#
wswtfjt72#