Home » SQL & PL/SQL » SQL & PL/SQL » How to remove blank space in oracle column???
How to remove blank space in oracle column??? [message #23481] Thu, 12 December 2002 05:01 Go to next message
Praveen
Messages: 57
Registered: November 2001
Member
hi ,

I want to know that while inserting record in to database if user insert one blank line (Press Enter) then how will we remove that blank line??

Like while inserting some record if user first press enter and then he type data ,so it won't give any earror but while checking it won't fetch that record.

I tried with trim , it remove blank space but not blank line so if there is any other way to remove then plese send me.

praveen gattani
Re: How to remove blank space in oracle column??? [message #23483 is a reply to message #23481] Thu, 12 December 2002 07:46 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
SQL> create table test71
  2  (a varchar2(2000));

Table created.
SQL> insert into test71
  2  values
  3  ('first line
  4  second line');

1 row created.

SQL> commit;

Commit complete.

SQL> select * from test71;

A
----------------------------------------------------------------------------------------------------
first line
second line

SQL> ed
Wrote file afiedt.buf

  1* select replace(a,chr(10),' ') from test71
SQL> /

REPLACE(A,CHR(10),'')
----------------------------------------------------------------------------------------------------
first line second line

Previous Topic: I want to store a err message in Log/Txt file
Next Topic: Undo an update made on a column.
Goto Forum:
  


Current Time: Wed May 15 18:27:11 CDT 2024