title: How to REPLACE any form of the word null using decode in Oracle?
body: <pre><code>SELECT DECODE(
           add1,
           null,    '.',
           ' ',     '.',
           '{null}','.',
                    LTRIM( RTRIM( REPLACE( add1,'"','.'), ' '), ' ')
         ),
         code,
         add1
  FROM   addrlist
  </code></pre>
  
  <p>I am trying to replace any null word (any case-insensitive word <code>null</code> or <code>nuLL</code> or <code>NulL</code> etc.) or blank value of add1 (varchar2) with a dot (<code>.</code>).</p>
  
  <p>The above code does not completely achieve it, could you please suggest a better solution.</p>
  
  <p>Update : the column add1 will contain only a single string null in any form which may have only spaces in the beginning or the end of the word null. Please find below some examples:</p>
  
  <pre><code>Input              | Expected Result
  -------------------------------------
              'nuLL' |             '.'
  '        NuLL    ' |             '.'     
              'null' |             '.'
  NULL               |             '.'
  </code></pre>