title: query on a query
body: <p>I need a help with a  small query.</p>
  
  <p>Table A:- status and the contents of it are below.</p>
  
  <pre><code> status_id      status_descrip 
          1          held 
          2          release 
          3          WIP
  </code></pre>
  
  <p>Table B:- Entry is another  table which has some 30 fields. Out of which 2 fields are referring to Table A-> status table. For simplicity i am skipping other fields and jotting down only the fields related with status.</p>
  
  <pre><code> entry_id        design_status         stress_status
       1                 3                   1
       2                 1                   2
       3                 NULL                2
       4                 3                   3
       5                 NULL                1
       6                 NULL               NULL      
       7                 NULL                2   
  </code></pre>
  
  <p>I can't change the structure of Entry to split into 2 tables one as design_status and other as stress_status. </p>
  
  <p>Now i want the entries from entry table replace the status with their descriptions. so the output will be </p>
  
  <pre><code>   entry_id        design_status_descrip         stress_status_descrip
        1                   WIP                          held
        2                   held                         release
        3                   NULL                         release
        4                   WIP                          WIP.
        5                   NULL                         held
        6                   NULL                         NULL
        7                   NULL                         release
  </code></pre>
  
  <p>Thanks in advance!</p>
  
  <p>EDIT:-</p>
  
  <p>Question is edited with Entries.</p>
  
  <p>Thankyou for all your responses!</p>
  
  <p>and the query finally working for me is,</p>
  
  <pre><code>SELECT     b.entry_id,     design_status_descrip = d.status_descrip,   
    stress_status_descrip = s.status_descrip FROM     entry AS b   
    LEFT OUTER JOIN status AS d     ON b.design_status = d.status_id   
    LEFT OUTER JOIN  status AS s     ON b.stress_status = s.status_id
  </code></pre>
  
  <p>do let me know, if i can improve this query.</p>