Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 466
  • Last Modified:

Statement(s) could not be prepared on link server

declare testcursor cursor for
SELECT namelink
FROM linkserver.database.dbo.tablename



error
Statement(s) could not be prepared.
0
PradeepYadhav
Asked:
PradeepYadhav
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you cannot use cursor for select on linked server.
you have to copy the relevant rows locally, and put the cursor on that local (temp) table.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now