Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: query prob
Try this
for leading spaces :
select name,length(name),rtrim(name)
from ora_test
where length(rtrim(ltrim(name))) != length(rtrim(name));
for lagging spaces :
select name,length(name),ltrim(name)
from ora_test
where length(ltrim(rtrim(name))) != length(ltrim(name));
NAME LENGTH(NAME) -------------------- ------------ Karthik Mohan 15 -- 1 leading space and 1 lagging space Siva 6 -- 2 lagging spaces God 5 -- 2 leading spaces
3 rows selected.
Regards,
Karthik Mohan
-----Original Message-----
Sent: Thursday, July 05, 2001 12:10 PM
To: Multiple recipients of list ORACLE-L
hi all
i have one table in which the note column have following entries
ID NOTE
GRAIN STORAGE 31177528 EDGEWOOD COMMONS
i want to find the leading as well as trailing spaces in the note field, i am getting the leading spaces using the following query
select id,NOTE
from test
where note like ' %' ;
plz provide me query to get the leading as well as trailing spaces..
thanks in advance
Shirish Khapre, SE Rolta India Ltd.
Off Ph No. (+91) (022) 8326666,8262222,8300568
Ext'n 2730
Minds are like parachutes. They only function when they are open
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Shirish Khapre
INET: shirish_at_rolta.com
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Thu Jul 05 2001 - 00:51:01 CDT
![]() |
![]() |