Home » SQL & PL/SQL » SQL & PL/SQL » how to ignore whitespace in the result of a query
how to ignore whitespace in the result of a query [message #236328] Wed, 09 May 2007 11:18 Go to next message
aline
Messages: 92
Registered: February 2002
Member
SQL> create table test ( a varchar2(12));

Table created

SQL> insert into test values ('aaa   bbb ');

1 row inserted

SQL> select a from test;

A
------------
aaa   bbb

SQL> select ??????  from test;

select ?????? from test


?????
------------
aaabbb



what is the text for ??????

thk for the help!


ps: I'm working with oracle 9.2.0.7

[Updated on: Wed, 09 May 2007 11:19]

Report message to a moderator

Re: how to ignore whitespace in the result of a query [message #236336 is a reply to message #236328] Wed, 09 May 2007 11:50 Go to previous messageGo to next message
Michel Cadot
Messages: 64117
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Use replace:
SQL> select replace(a,' ','') a from test;
A
------------
aaabbb

1 row selected.

Regards
Michel
icon7.gif  Re: how to ignore whitespace in the result of a query [message #236573 is a reply to message #236328] Thu, 10 May 2007 05:00 Go to previous message
aline
Messages: 92
Registered: February 2002
Member
excellent!

thk Smile
Previous Topic: Searching excluding certain characters
Next Topic: how to retrive last five records from table
Goto Forum:
  


Current Time: Tue Dec 06 04:30:56 CST 2016

Total time taken to generate the page: 0.13490 seconds