title: SQL: Inner and Left Join with The multi-part identifier error
body: <p>I have two query like this;</p>
  
  <pre><code>SELECT  j.ID, j.Pkey, j.SUMMARY, j.CREATED, j.RESOLUTIONDATE
          ,j2.SUMMARY, j2.CREATED, j2.RESOLUTIONDATE, j3.SUMMARY, j3.CREATED, j3.RESOLUTIONDATE
  FROM Jira.jiraissue As j
  INNER JOIN Jira.issuelink i
      ON i.SOURCE =j.ID and i.SEQUENCE = 0
  INNER JOIN Jira.jiraissue As j2
      ON i.DESTINATION =j2.ID
  LEFT JOIN Jira.issuelink i2 
      ON i2.SOURCE = j.ID  and i2.SEQUENCE = 1
  LEFT JOIN Jira.jiraissue As j3 
      ON i2.DESTINATION = j3.ID
  </code></pre>
  
  <p>This works great. But when I try to implement (after inner join part) to another query, I getting an error.</p>
  
  <pre><code>  SELECT A.pkey as KREDİ, A.SUMMARY , B.pname AS STATU, D.Sorumlu AS SORUMLU, A.CREATED, A.RESOLUTIONDATE, dbo.CUSTVAL(11931, A.ID, 'S') AS BAYİ, dbo.GetLastStatuTime(A.ID) AS SON_STATU_TAR,j2.SUMMARY, j2.CREATED,j2.UPDATED, j2.RESOLUTIONDATE, j3.SUMMARY, j3.CREATED, j3.UPDATED, j3.RESOLUTIONDATE
  FROM Jira.jiraissue A, jira.issuestatus B, AspNetServicesDB.dbo.STATU_MAP D
  INNER JOIN Jira.issuelink i
      ON i.SOURCE = A.ID and i.SEQUENCE = 0
  INNER JOIN Jira.jiraissue As j2
      ON i.DESTINATION =j2.ID 
  LEFT JOIN Jira.issuelink i2 
      ON i2.SOURCE = A.ID  and i2.SEQUENCE = 1
  LEFT JOIN Jira.jiraissue As j3 
      ON i2.DESTINATION = j3.ID
  WHERE A.issuestatus = B.ID
  AND 'BAŞARAN OTOMOTİV' = dbo.CUSTVAL(11931, A.ID, 'S')
  AND B.pname = D.JiraStatu collate Turkish_CS_AI
  AND A.issuetype != 11
  </code></pre>
  
  <p>I only change <code>j.ID</code> to <code>A.ID</code>. The error message is;</p>
  
  <pre><code>The multi-part identifier "A.ID" could not be bound.
  Msg 4104, Level 16, State 1, Line 8 
  The multi-part identifier "A.ID" could not be bound.
  </code></pre>
  
  <p>I don't understand why. A means <code>Jira.jiraissue</code> table has <code>ID</code> column. Why <code>j.ID</code> works in first query but doesn't work <code>A.ID</code> in second query?</p>