Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

What is the purpose of the OPENQUERY syntax?

 
   Database Forums (Home) -> ODBC RSS
Next:  Q: Trying to make Word (.doc) archive SQL 2005 we..  
Author Message
arno

External


Since: Jan 08, 2008
Posts: 6



(Msg. 1) Posted: Thu Jan 17, 2008 2:04 pm
Post subject: What is the purpose of the OPENQUERY syntax?
Archived from groups: microsoft>public>sqlserver>odbc (more info?)

Hello,

I am using linked servers over ODBC. Most queries fail, however, they work
when I use the OPENQUERY syntax. This appears to be a problem of at least
SQL server 2000 and 2005 express. Strange, but MS ACCESS databases work
perfectly with the ODBC-linked tables with "normal" sql-syntax.

I would like to know if there are other solutions than OPENQUERY as this
causes new problem eg. with quotation marks, just try to convert

select 'hi' test from MYLINK...TABLE

to

select * from openquery, MYLINK, 'select 'hi' test from TABLE')

regards

arno

 >> Stay informed about: What is the purpose of the OPENQUERY syntax? 
Back to top
Login to vote
DonRamesh

External


Since: Mar 07, 2008
Posts: 1



(Msg. 2) Posted: Fri Mar 07, 2008 11:20 am
Post subject: RE: What is the purpose of the OPENQUERY syntax? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

try like this
select * from openquery, MYLINK, 'select ''hi'' test from TABLE')

Ramesh M

"arno" wrote:

> Hello,
>
> I am using linked servers over ODBC. Most queries fail, however, they work
> when I use the OPENQUERY syntax. This appears to be a problem of at least
> SQL server 2000 and 2005 express. Strange, but MS ACCESS databases work
> perfectly with the ODBC-linked tables with "normal" sql-syntax.
>
> I would like to know if there are other solutions than OPENQUERY as this
> causes new problem eg. with quotation marks, just try to convert
>
> select 'hi' test from MYLINK...TABLE
>
> to
>
> select * from openquery, MYLINK, 'select 'hi' test from TABLE')
>
> regards
>
> arno
>
>
>

 >> Stay informed about: What is the purpose of the OPENQUERY syntax? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
OpenQuery with dBase tables - Hi, I upgraded our SQL Server from 2000 to 2005. Since then, OpenQuery against xBase tables behaves uncommonly: At the server machine, I can use OpenQuery(LServer,'select * from \\host \path\table) and it works fine. If I use the same query from a..

Connecting to Paradox - Hello, I am trying to connect to paradox database for the purpose of updating the record(s) in DTS ActiveX Script Task. I used the following connection string. But I get an error while connection. I have "UMTest.db" and "UMTest.px" ...

app hangs after ODBC API call - Our app that uses MFC ODBC classes(CDATABASE, CRECORDSET) often hangs after the folllowing sequence: - open connection - connection to DB lost due to network problems - close connection - open connection - open recordset App hangs in..

Insert failed - I am running the code below on two similar tables. They both have an identity insert field and both have a timestamp. The first routine labeled Insert Product Materials runs fine, the second, Insert products mateirals, fails. This is the error: error....

Troubles pulling binary data into VBScript - I'm a normal resident of the vbscript/wsh/server scripting forums, as I'm more of a scripter, and don't know word one about SQL...so here I am - :) I'm attempting to query a MS WSUS database stored on our SQL server (SQL 2000) - one of the two fields...
   Database Forums (Home) -> ODBC All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]