title: How to mask characters with X in a varchar2 field in Oracle SQL
body: <p>I have a list of varchar records (column) varchar2(30) with names. How to mask characters inside the name with the listed criteria. </p>
  
  <p>e.g. </p>
  
  <pre><code>Tristram Vladimir Chan   &lt;---Original name
  1234567890123456789012   &lt;---ruler (character count)
  .....XXXXX.....XXXXX.....&lt;--- masking criteria: copy every 5 characters, mask next 5 characters to X
  TristXXX XladimXX XXan   &lt;--- expected results
  </code></pre>
  
  <p>What makes this tricky is the special treatment for the space " " character...</p>
  
  <p>Whats the quickest way to accomplish this? any libraries, procedures or shortcuts that can be used? Thanks a lot guys!!!!</p>