simple open query insert fails when running from stored procedure but same thing works if i run it manually;
INSERT INTO OPENQUERY([ServerName],
'select LocationCode, Name, Zip from Location.TKT')
VALUES( 1200, 'David', 52330);
same SP is running fine in Production but not in DEV machine i am getting the below error. Any clue?
Error Message: OLE DB provider "IBMDASQL" for linked server "ServerName" returned message "SQL0104: Token . was not valid. Valid tokens: . Cause . . . . . : A syntax error was detected at token .. Token . is not a valid token. A partial list of valid tokens is . This list assumes that the statement is correct up to the token. The error may be earlier in the statement, but the syntax of the statement appears to be valid up to this point. Recovery . . . : Do one or more of the following and try the request again: -- Verify the SQL statement in the area of the token .. Correct the statement. The error could be a missing comma or quotation mark, it could be a misspelled word, or it could be related to the order of clauses. -- If the error token is , correct the SQL statement because it does not end with a valid clause.".