title: translate query from Oracle to Postgres
body: <p>I need to translate this query from Oracle to Postgres:</p>
  <pre><code>select
  case when (not regexp_like(upper(location),'^[0-9]{1,5} [A-Z]') or not regexp_like(upper(location),'^[0-9]{1,5}.* [a-z]') or regexp_like(upper(location),'^[0-9]{1,5}')) and regexp_like(upper(modelname),'CEDMI') then '74'
  when (not regexp_like(upper(location),'^[0-9]{1,5} [A-Z]') or not regexp_like(upper(location),'^[0-9]{1,5}.* [a-z]') or regexp_like(upper(location),'^[0-9]{1,5}')) and regexp_like(upper(modelname),'CEDNA') then '768'
  when (not regexp_like(upper(location),'^[0-9]{1,5} [A-Z]') or not regexp_like(upper(location),'^[0-9]{1,5}.* [a-z]') or regexp_like(upper(location),'^[0-9]{1,5}')) and regexp_like(upper(modelname),'CEDRM') then '598'
  when (not regexp_like(upper(modelname),'CEDMI') or not regexp_like(upper(modelname),'CEDNA') or not regexp_like(upper(modelname),'CEDRM')) and (regexp_like(upper(location),'^[A-Z]') or location is null) then null
  else location
  end as LOCATION
  from stagingarea.ENEL_TLC_T_DEVICE
  </code></pre>
  <p>can someone help me?</p>
  <p>thanks in advance for your attention and support</p>