title: SQL - SAP HANA - Console Content to long - Pass some code to a procedure?
body: <p>I have an SQL Script in my SAP HANA SQL Console with ~1700 rows.
  I have so many rows, as I need to change alot of entries in one column which is imported from one "raw table". <a href="https://stackoverflow.com/questions/53260132/sql-sap-hana-replace-regexpr-in-column-table">More detailed description about this "change row entries" problem</a> 
  The repetitive WHEN THEN Code looks like: `</p>
  
  <pre><code>Create Column Table xxx
  Select Distinct 
     aaa AS "aaa",
     bbb AS "bbb",
     ccc AS "ccc",
     CASE 
        WHEN importedColumn like 'xx123x' THEN REPLACE_REGEXPR ('xx123x' FLAG 'i' IN importedColumn WITH 'xxx')
        WHEN importedColumn like 'yy345y' THEN REPLACE_REGEXPR ('yy345y' FLAG 'i' IN importedColumn WITH 'yyy') 
        WHEN importedColumn like 'zzz345z' THEN REPLACE_REGEXPR ('zzz345z'FLAG 'i' IN importedColumn WITH 'zzzz') 
        etc.
        etc. 
        ELSE xxx 
     END AS replace_regexpr 
  FROM...
  WHERE...
  </code></pre>
  
  <p>This (generally) works fine.
  The problem is, I have so many different WHEN THEN Statements (Always checking the entries of this one column and maybe change them) that I cannot execute the Code anymore -> SQL console Content is too large.
  Can I extract this case Statement somehow and store it in an procedure or something like this?
  I really have no clue how I can handle this, so I am happy for every advise!</p>
  
  <ul>
  <li>Note: The column entries that need to be changed do not have any common pattern, so I cannot group them or something like this. This means that I need that many WHEN THEN Statements.</li>
  </ul>