all groups > sql server odbc > september 2006 >
You're in the

sql server odbc

group:

odbc open query syntax to db2


odbc open query syntax to db2 Bill
9/28/2006 8:56:25 AM
sql server odbc:
Ok all you Gurus,
Here is a problem we are having, we have a sql server 2000 and we have
another server which is a DB2 server. The db2 server is linked. We are
trying to run an open query and I do not think I have the right syntax
to accomplish this task. Please see query following


go
SELECT *
FROM OPENQUERY(Bacarditest,'SELECT top 10* FROM USA.accts')
go

I do not know if this is correct concerning the syntax for db2 that
would be the sytax inside of the ()
this query runs fine with a select * instead of the top 10
please advise

thanx
Bill







Re: odbc open query syntax to db2 Arnie
9/28/2006 3:02:11 PM
[quoted text, click to view]

Try this Bill (untested),

SELECT *
FROM OPENQUERY(Bacarditest,'SELECT * FROM USA.accts FETCH FIRST
10 ROWS ONLY')

- Arnie

AddThis Social Bookmark Button