|
Home > Archive > MS SQL Server ODBC > October 2006 > odbc open query syntax to db2
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
odbc open query syntax to db2
|
|
|
| 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(Bacardites
t,'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
*** Sent via Developersdex http://www.droptable.com ***
| |
|
| "Bill" <nospam@devdex.com> wrote in message
news:%23UWynax4GHA.2144@TK2MSFTNGP04.phx.gbl...
> 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(Bacardites
t,'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
Try this Bill (untested),
SELECT *
FROM OPENQUERY(Bacardites
t,'SELECT * FROM USA.accts FETCH FIRST
10 ROWS ONLY')
- Arnie
|
|
|
|
|