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 2000 Forums
 SQL Server Development (2000)
 openquery

Author  Topic 

khalik
Constraint Violating Yak Guru

443 Posts

Posted - 2001-11-15 : 03:39:25
hi

a small problem i want to access data from oracle from sql so i am use this query it works fine in query analyzer but when i run in VB using ADO rs.open it gives incorrect syntax

query--
select OWNER_ID,ACCOUNT_ID,subref from openquery(mibas,"select OWNER_ID,ACCOUNT_ID, to_char(subscriber_ref) subref from mbs.t006_subscriber where subscriber_id='525127170047796'")

i tried by cn.execute it does not work

error
Line 1: Incorrect syntax near 'select OWNER_ID,ACCOUNT_ID, to_char(subscriber_ref) subref from mbs.t006_subscriber where subscriber_id='525127170047796''.

   

- Advertisement -