title: SQL Query - Table Joining Problems
body: <p>I am having some serious problems wrapping my head around how to build a proper query for my situation.. Pretty sure it depends on joining the tables properly but I cant seem to figure it out after a lot of googling...</p>
  
  <p>I have the following tables..</p>
  
  <pre><code>Main:
  ID, WhenDate, InfoText, StatusID, TypeID
  </code></pre>
  
  <p>and...</p>
  
  <pre><code>Status:
  ID, StatusText    
  </code></pre>
  
  <p>and...</p>
  
  <pre><code>Secondary:
  MainID, WhenDate
  </code></pre>
  
  <p>Hope Im able to explain this correctly..
  I have a bunch of records in Main that I need to get info from.. I need to be able to filter on WhenDate and TypeID. I also need to get StatusText from Status table that is linked to StatusID.
  <br><b>The problem:</b> <br>
  The table Secondary links to records in Main, any record in Secondary should result in a row that is identical to the record in Main with the exception that the WhenDate in Secondary is used instead of the WhenDate in Main.<br></p>
  
  <p>Any help greatly appreciated, even if its just a hint, such as what types of joins to use or something...</p>