Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to remove blank/space from column value

user12236189Jun 3 2012 — edited Jun 4 2012
Hello,
Database: Oracle 11g r2
  1* create table t ( t varchar2(30))
SQL> /

Table created.

SQL> insert into t values('
  2  Answer: a
  3  ');

1 row created.

SQL> select * from t;

T
------------------------------

Answer: a


  1* select rownum, ltrim(rtrim(trim(t))) t from t
SQL> /

    ROWNUM             T
----------             ------------------------------
         1
                       Answer: a
I want trim off the blank in the column when selecting the record.
Any help would be greatly appreciated.

Is there anything like to replace

Thanks,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 2 2012
Added on Jun 3 2012
5 comments
8,974 views