title: Bulk trimming all columns in a table
body: <p>I'm trying to create a small PL\SQL code to remove all leading and ending spaces in a table. I created 2 files, column_trimmer &amp; stop. The stop.sql is nothing more than a message to say have a nice day. The column_trimmer has the main code. All I need is to grab the specified table and then grab all the columns in that table and remove leading and ending spaces. This is what I have so far..</p>
  
  <pre><code>ACCEPT column_name CHAR PROMPT 'Please specify the table name' 
  </code></pre>
  
  <blockquote>
  <pre><code>     NEED CODE IN HERE TO GRAB TABLE NAME, THEN ALL COLUMNS IN IT
                AND APPLY IT TO THE CODE BELOW
  </code></pre>
  </blockquote>
  
  <pre><code>UPDATE EWS_PHONE_SLX SET columnname = TRIM(columnname);
  ACCEPT response CHAR PROMPT 'Task completed! Would you like to trim all columns in another table? '
  SET TERM OFF
  
  SELECT CASE LOWER('&amp;&amp;response.') WHEN 'yes' THEN 'column_trimmer' ELSE 'no' END AS script
  FROM DUAL;
  
  SET TERM ON
  
  @&amp;script
  </code></pre>