title: Can't join three tables and return all records from just one
body: <p>I am using, but very new to, SQL Server Express 2012 and SS Management Studio and databases in general.
  Despite much time and research, I cannot quite achieve my goal with a particular stored procedure and can't move on without some advice.</p>
  
  <p>I want to retrieve data from three related Tables A, B and C.
  I want to have all rows from TableA and only the relevant rows from tables TableB and TableC (if they exist).</p>
  
  <p>I found <a href="https://stackoverflow.com/questions/3226912/join-three-tables">this link</a> on StackOverflow which was the closest match to my problem, which I have tried without success.  The code snippet is as follows:</p>
  
  <pre><code>SELECT A.*
  FROM
    (TableA A LEFT JOIN TableB B ON A.id = B.a_id)
    LEFT JOIN TableC C ON A.id = C.a_ID 
  </code></pre>
  
  <p>Now, this code has the related "ID" fields for TableB (B.a_id) and TableC (C.a_id) BOTH related to TableA (A.id).</p>
  
  <p>In my case, TableA is related to TableB and TableC is related to TableB.  It is all records from TableA that I want returned with just a couple of 'descriptive' fields from the other two tables for each of the TableA records.
  I am returning more records than I require so how do I filter the output to just the records in TableA?</p>
  
  <p>Can anyone suggest what I should do to resolve this please.</p>
  
  <p><strong>IMPORTANT EDIT</strong></p>
  
  <p>Sorry everyone - just to clarify from reading your excellent responses..</p>
  
  <p>I JUST want to return ALL rows in TableA ONLY.  I am including TableB and TableC just to return appropriate columns for each of these rows.</p>
  
  <p><strong>FURTHER INFO EDIT</strong></p>
  
  <p>In simple terms my context is similar to this:</p>
  
  <p>TableA is a table of Employees.  It has two columns: EmployeeID, EmployeeName</p>
  
  <p>TableB is a table of Depts.  It has three columns DeptID, DeptName, EmployeeID</p>
  
  <p>TableC is a table of Firms.  It has three columns FirmID, FirmName, DeptID</p>
  
  <p>I want a list of all Employees (i.e. all rows in TableA) to put into a listbox (in Excel VBA) from which the user can select.  In the listbox I would want to show the user respective columns from TableB and TableC:</p>
  
  <p>EmployeeID, EmployeeName, FirmName, DeptName </p>
  
  <p>I am looking for the logic and query code to achieve this</p>