gpt4 book ai didi

oracle - 将字符串转换为十进制 Oracle 数据库

转载 作者:行者123 更新时间:2023-12-05 06:37:03 27 4
gpt4 key购买 nike

我打算在 Oracle 数据库中将数据类型字符串转换为十进制,但出现此错误:

ORA-01722: número no válido 01722. 00000 - "invalid number" *Cause: The specified number was invalid. *Action: Specify a valid number

代码:

TO_NUMBER('5.0') AS numero

CAST('5.0' AS NUMBER) AS numero

最佳答案

select TO_NUMBER('5.0') from dual;

select NLS_NUMERIC_CHARACTERS
from v$nls_parameters;

--There must be '.' in value filed to run above query

关于oracle - 将字符串转换为十进制 Oracle 数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48593987/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com