gpt4 book ai didi

java - ORA-01858 : a non-numeric character was found where a numeric was expected in Oracle ADF

转载 作者:行者123 更新时间:2023-11-30 08:12:02 30 4
gpt4 key购买 nike

为什么我会通过 Java 应用程序执行此查询从 Oracle 收到上述 SQL 错误?

SELECT * FROM TestSchema.TestTable
WHERE userid = :userId
AND transactionDate BETWEEN TO_DATE(:start_date, 'yyyy-mm-dd')
AND TO_DATE(:end_date,'yyyy-mm-dd')

最佳答案

我明白了。在此示例中,start_dateend_date 不需要 to_date 函数。这工作得很好:

SELECT * FROM TestSchema.TestTable
WHERE userid = :userId
AND transactionDate BETWEEN :start_date AND :end_date

关于java - ORA-01858 : a non-numeric character was found where a numeric was expected in Oracle ADF,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30261421/

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