Incorrect syntax near the keyword OPENQUERY

  • Hello, I'm trying to write an openquery select statement and for some reason I'm getting a syntax error on the line... as far as I can see, the syntax is perfect and the linked server I'm trying to use is valid and I'm able to access it.  Can anybody see something I'm doing wrong?

    Thanks!

    select * OPENQUERY(NDW2,'SELECT * FROM NORSNAPADM.SALE_CHNL_ITM_LINK')

  • Make sure NDW2 is your linked server. And you forget keyword from, try this:

    select * From OPENQUERY(NDW2,'SELECT * FROM NORSNAPADM.SALE_CHNL_ITM_LINK') AS T1

     

  • LOL, duh!  Thank you!  Needed another pair of eyes!

  • Edited.

Viewing 4 posts - 1 through 3 (of 3 total)

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