title: Msg 8180, Level 16, State 1, Line 1 Statement(s) could not be prepared. Msg 156, Level 15, State 1, Line 1 Incorrect syntax near the keyword 'as'
body: <pre><code>select 
      F.NidLog, F.NidFormReport , ltrim(rtrim(F.Caption)), F.NidTask, 
      F.NidUser, F.UserName, F.ActionState, F.ActionDate, F.ActionTime, 
      W.NidProc, W.WorkflowTitel, W.BizCode, W.NidWorkItem, T.TaskTitel
  from 
      openquery([192.168.12.69], '(select * from Esup..TaskLog) as F
                                  inner join Esup..Task as T on T.NidTask  = F.NidTask
                                  inner join Esup..WorkflowInstance as W on T.NidProc = W.NidProc')
  </code></pre>
  
  <p>After I execute the query shown above, I get this error:</p>
  
  <blockquote>
    <p>Msg 8180, Level 16, State 1, Line 1<br>
    Statement(s) could not be prepared.</p>
    
    <p>Msg 156, Level 15, State 1, Line 1<br>
    Incorrect syntax near the keyword 'as'.</p>
  </blockquote>