SQLTeam.com | Weblogs | Forums

AS400 Linked Server error in SSMS 2019

I execute this openquery statement < any ideas what is causing it?

SELECT * FROM OPENQUERY([AS400_MINDSERV], 'SELECT * FROM AS400_MINDSERV.S78359E0.QS36F.INDETLWO')

OLE DB provider "IBMDASQL" for linked server "AS400_MINDSERV" returned message "SQL0104: Token . was not valid. Valid tokens: FOR USE SKIP WAIT WITH FETCH LIMIT ORDER UNION EXCEPT OFFSET.
Cause . . . . . : A syntax error was detected at token .. Token . is not a valid token. A partial list of valid tokens is FOR USE SKIP WAIT WITH FETCH LIMIT ORDER UNION EXCEPT OFFSET. 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.".
Msg 7321, Level 16, State 2, Line 1
An error occurred while preparing the query "SELECT * FROM AS400_MINDSERV.S78359E0.QS36F.INDETLWO" for execution against OLE DB provider "IBMDASQL" for linked server "AS400_MINDSERV".

Completion time: 2020-03-13T10:37:46.5061668-06:00

I think it should be?

SELECT * 
  FROM OPENQUERY([AS400_MINDSERV], 
'SELECT * FROM S78359E0.QS36F.INDETLWO') src