2

I have been tasked with converting some scripts referencing an Informix database to be compatible with a new Oracle database.

I thought I would start out by going through the individual scripts and looking for function calls that may vary syntactically between Informix and Oracle. I had been able to find the Oracle equivalent for most of the function calls I came across, however this one has me a little stumped:

where f.writetime > current - interval(xxx) day to day

What exactly does that function mean, particularly the (xxx) part and what is the Oracle equivalent?

4

1 回答 1

4

这不是函数调用 - 它是 Informix SQL 的INTERVAL 数据类型文字语法

Oracle SQL 也支持区间数据类型

我希望甲骨文会给出类似的结果

WHERE f.writetime > current_timestamp - INTERVAL 'xxx' DAY TO DAY

本质上,当写入时间大于当前时间减去 xxx 天时。

于 2012-06-18T19:32:10.780 回答