title: Finding Non-Numeric Characters in a string
body: <p>I found a couple threads on this topic but the answers seemed a little too complex for what I'm trying to do. </p>
  
  <p>I am using SQL Developer and have a table, lets call it HR_Employees. This table I have to use to populate a fact table, we will call it Fact_Key. This fact table has 3 columns, including a description as well as the Employee_Key column (which is the primary key).</p>
  
  <p>The task I have is to figure out a way to create the employee_key off of a Department_ID field. For half of the company this is automatically generated based on some payroll information and pushed into the Fact_Key table however for the other half (which is merging into the first half) they do not use the same payroll system so this wouldn't work for us. I have to take the Department_ID and use that to create an employee_key by concatenating it with other fields (employee_number for instance). See below:</p>
  
  <pre><code> INSERT INTO FACT_KEY (Employee_Key, Description)
   SELECT RPAD(Employee_Number||Deptartment_ID, 15,'0'), EmployeeJob_Code
   FROM HR_EMPLOYEES
  </code></pre>
  
  <p>I am padding this to keep all keys at a consistent 15 character length. The problem I am experiencing is the Employee_Key field is a numeric data type but the Department_ID has non-numeric characters in it at random places. I need a way to remove those characters or preferably change them into their ASCII counterparts. Is there a simple way to do this?</p>
  
  <p>Everything I've seen appears too complex and I was looking for a simpler way to do this (involving just one or two functions) as this is going into a stored procedure and I was directed to keep it simple. Any help would be appreciated, Thanks!</p>