我在两个数据库Oracle和SYBASE之间使用FREETDS。我的查询正在oracle数据库上运行。Sybase数据库通过基于freetd的ODBC网关由DBLINK连接。查询是:
Select NAME, SURNAME, /ORT1/HAMBURG from MIKE
在这种情况下,我在查询中得到以下错误:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[FreeTDS][SQL Server]Incorrect syntax near '/'.
{42000,NativeErr = 102}
ORA-02063: preceding 3 lines from MAHRENS
28500. 00000 - "connection from ORACLE to a non-Oracle system returned this message:"
*Cause: The cause is explained in the forwarded message.
*Action: See the non-Oracle system's documentation of the forwarded message.
如有任何帮助,将不胜感激
谢谢Michael
Oracle使用双引号来转义特殊字符,Sybase使用方括号。所以你可以使用其中一种:
Select NAME, SURNAME, "/ORT1/HAMBURG" from MIKE
或
Select NAME, SURNAME, [/ORT1/HAMBURG] from MIKE
或者,为表创建一个视图并使用它。