Help get this topic noticed by sharing it on Twitter, Facebook, or email.

Error translating SQL statement

I am receiving the following error message with a SQL Select statement in a cursor:

Error: 13005 : Error translating SQL statement: line 1:248: unexpected token: )".
1 person has
this problem
+1
Reply
  • Problem: You have a SQL DECLARE CURSOR for a linked server table and you get the following error when running the SQL: OLE DB provider "DBAmp.DBAmp" for linked server "SALESFORCE" returned message "Error 13005 : Error translating SQL statement: line 1:248: unexpected token: )".

    Solution: Change the cursor to be a STATIC cursor:

    DECLARE Cur_GetPriceBookEntryId CURSOR STATIC FOR select ProductCode from SALESFORCE...PriceBookEntry
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited sad, anxious, confused, frustrated