LINKED SERVER to NETEZZA QUESTION

  • Hello, I have what I hope is a simple question. I have setup a linked server using a System ODBC DSN that connects to a Netezza device. I'm currently testing, and while the performance is solid, I'm having trouble understanding what is happening when I try to "SELECT TOP [X] FROM ..."

    My understanding is that this is supposed to be interpolated to "SELECT * FROM TABLE LIMIT [X]" but the query continues to give me all the records.

    I've tried both of these:

    SELECT TOP 10 *

    From [LINKED_SERVER].

    .[SCHEMA].

    SELECT TOP 10 *

    FROM OPENQUERY([LINKED_SERVER], 'SELECT * FROM

    .[SCHEMA].

    ')

    Both return all Records.

    If I try this:

    SELECT *

    FROM OPENQUERY([LINKED_SERVER], 'SELECT * FROM

    .[SCHEMA].

    LIMIT 10')

    I get an error that says "Incorrect syntax near "SELECT", found "10" "

    If I Alias the table then I get the same error except it says found 'Limit'

    Any ideas?

  • Remove the square brackets and ensure all your tables in the Openquery string

    SELECT *

    FROM OPENQUERY([LINKED_SERVER], 'SELECT * FROM DATABASE.SCHEMA.TABLE LIMIT 10')

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply