title: Mask the last 4 digit in an account number
body: <p>I need to do an Select on a table that has many records to mask the Account Number.</p>
  
  <p>Example AccNumber : 123400012341234</p>
  
  <p>Output result should look like 12340001234XXXX</p>
  
  <p>the last 4 digits should become X's. </p>
  
  <p>I come up with this so far</p>
  
  <pre><code>select SUBSTRING('XXXX', 0, 4 - len(RIGHT(AccNumber, 4))) + RIGHT(AccNumber, 4) from table
  </code></pre>
  
  <p>Did I miss anything?</p>