title: display locationcode instead of Location in sql
body: <p>I want to display in the report the LocationCode instead of the Location from the same table <a href="https://i.stack.imgur.com/ohu0o.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ohu0o.jpg" alt="enter image description here"></a></p>
  
  <p>Edit:
  Code (as user added it to an answer):</p>
  
  <pre><code>select LC.LocationCode 
  from LocationMain LM 
  left outer join 
  (Select Location,LocationCode from LocMaster AS LR) ON LR.Location=LM.Location
  </code></pre>