ora-01790

Recursive SQL giving ORA-01790

好久不见. 提交于 2019-12-04 12:55:33
问题 Using Oracle 11g release 2, the following query gives an ORA-01790: expression must have same datatype as corresponding expression: with intervals(time_interval) AS (select trunc(systimestamp) from dual union all select (time_interval + numtodsinterval(10, 'Minute')) from intervals where time_interval < systimestamp) select time_interval from intervals; The error suggests that the datatype of both subqueries of the UNION ALL are returning different datatypes. Even if I cast to TIMESTAMP in

Recursive SQL giving ORA-01790

北战南征 提交于 2019-12-03 08:56:36
Using Oracle 11g release 2, the following query gives an ORA-01790: expression must have same datatype as corresponding expression: with intervals(time_interval) AS (select trunc(systimestamp) from dual union all select (time_interval + numtodsinterval(10, 'Minute')) from intervals where time_interval < systimestamp) select time_interval from intervals; The error suggests that the datatype of both subqueries of the UNION ALL are returning different datatypes. Even if I cast to TIMESTAMP in each of the subqueries, then I get the same error. What am I missing? EDIT: I'm not looking for a CONNECT

How to resolve Oracle error ORA-01790?

可紊 提交于 2019-12-01 18:14:48
I have two select statements joined by "union". While executing that statement I've got: Error report: SQL Error: ORA-01790: expression must have same datatype as corresponding expression 01790. 00000 - "expression must have same datatype as corresponding expression" Maybe you can give me an advise on how to diagnose this problem? Without looking at your SQL, I would guess that you have columns being UNION'ed that have different data types. Here's what found: ORA-01790: expression must have same datatype as corresponding expression Cause: A SELECT list item corresponds to a SELECT list item

How to resolve Oracle error ORA-01790?

萝らか妹 提交于 2019-12-01 17:32:52
问题 I have two select statements joined by "union". While executing that statement I've got: Error report: SQL Error: ORA-01790: expression must have same datatype as corresponding expression 01790. 00000 - "expression must have same datatype as corresponding expression" Maybe you can give me an advise on how to diagnose this problem? 回答1: Without looking at your SQL, I would guess that you have columns being UNION'ed that have different data types. 回答2: Here's what found: ORA-01790: expression