视图类集成对象SQL语句的注意事项
视图类集成对象SQL语句的注意事项
oracle直连创建视图对象方案异常
Caused by: Error : 904, Position : 47, Sql = select "fcreatetime", "fcreatorid", "fnumber", "fstatus" from (select fnumber,fstatus,fcreatorid,fcreatetime from DEVOTHER_DEV_ORACLE_EIP.T_DC_IGR_SOUR) ISC_SOURCE_VIEW , OriginalSql = select "fcreatetime", "fcreatorid", "fnumber", "fstatus" from (select fnumber,fstatus,fcreatorid,fcreatetime from DEVOTHER_DEV_ORACLE_EIP.T_DC_IGR_SOUR) ISC_SOURCE_VIEW , Error Msg = ORA-00904: "fstatus": 标识符无效 at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:498) ... 34 more
错误写法:
正确写法:
当数据源是 Oracle数据库 或 数据库代理连接的数据库实际是Oracle数据库时,视图类集成对象的SQL语句需要注意以下事项。
1.SELECT语句的字段必须加别名,且别名必须使用小写并用双引号括起来,如下: SELECT field as "alias" FROM table_name
2.number在Oracle的SQL语句中是关键字,如果以 number 作为字段名或别名,一定要用双引号括起来。
视图类集成对象SQL语句的注意事项
本文2024-09-23 00:52:09发表“云苍穹知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-cangqiong-142264.html