Firebird SELECT DATEDIFF 查询 returns 无
Firebird SELECT DATEDIFF query returns nothing
我正在使用 Eclipse 的 "Database Development" 透视图对 Firebird 数据库进行 运行 查询。一个特定的字段 studydatetime
为我提供了 problems.It 的时间戳字段,其中包含体检的日期和时间。我有一个只包含日期的文本文件,我需要将两者匹配以填充文本文件中的一些空白。但是当我 运行 像
select datediff(day,1,'2017-07-26')
from worklistdisplay
rows 1;
我什么也没得到 - 甚至没有没有行的查询。即使我 运行 像
select datediff(day,'2017-07-01','2017-07-26')
from rdb$database;
我得到了同样的结果。 Eclipse 结果中的 "Status" 选项卡 window 表示
(0 rows affected)
Elapsed Time: 0 hr, 0 min, 0 sec, 25 ms.
但是没有返回任何结果。
我在 Firebird 中使用 "Generic JDBC_1.x" 连接类型,驱动程序文件 "jaybird-full-3.0.1.jar"。数据库版本为 2.5.4.
施展到现在会有帮助
select datediff(day,cast('2017-07-01' as date),cast('2017-07-26' as date)) from rdb$database
这个return25
我正在使用 Eclipse 的 "Database Development" 透视图对 Firebird 数据库进行 运行 查询。一个特定的字段 studydatetime
为我提供了 problems.It 的时间戳字段,其中包含体检的日期和时间。我有一个只包含日期的文本文件,我需要将两者匹配以填充文本文件中的一些空白。但是当我 运行 像
select datediff(day,1,'2017-07-26')
from worklistdisplay
rows 1;
我什么也没得到 - 甚至没有没有行的查询。即使我 运行 像
select datediff(day,'2017-07-01','2017-07-26')
from rdb$database;
我得到了同样的结果。 Eclipse 结果中的 "Status" 选项卡 window 表示
(0 rows affected)
Elapsed Time: 0 hr, 0 min, 0 sec, 25 ms.
但是没有返回任何结果。
我在 Firebird 中使用 "Generic JDBC_1.x" 连接类型,驱动程序文件 "jaybird-full-3.0.1.jar"。数据库版本为 2.5.4.
施展到现在会有帮助
select datediff(day,cast('2017-07-01' as date),cast('2017-07-26' as date)) from rdb$database
这个return25