Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 SQL Server 2005 Link Server Problem to Oracle

Author  Topic 

pingii
Starting Member

1 Post

Posted - 2009-02-19 : 08:58:51
Hi all,


I have a Linked Server object in SQL Server 2005 to query an Oracle view. The view returns all table rows.

Linked server name in sql server 2005 is : ASE

Linked Server object in SQL Server 2005 is connecting to Oracle view successfully.


select * FROM OPENQUERY(ASE,'SELECT TOP 1 EMPCODEEIN FROM ASE_VIEW_00050')


My problem while execute the above select query, I am getting below error:

OLE DB provider "OraOLEDB.Oracle" for linked server "ASE" returned message "ORA-00923: FROM keyword not found where expected".
Msg 7321, Level 16, State 2, Line 1
An error occurred while preparing the query "SELECT TOP 1 EMPCODEEIN FROM ASE_VIEW_00050" for execution against OLE DB provider "OraOLEDB.Oracle" for linked server "ASE".


Can any one help me out to resolve the issue?

Thanks in advance.

Thanks
Ping

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2009-02-19 : 09:21:41
Not sure, do you have TOP in oracle? If not, then this will be your issue.

Try this instead:

http://www.anticlue.net/archives/000391.htm
Go to Top of Page
   

- Advertisement -