Home » SQL & PL/SQL » SQL & PL/SQL » rtrim problem
rtrim problem [message #184125] Tue, 25 July 2006 08:19 Go to next message
haitham
Messages: 60
Registered: February 2006
Member
i wrote the following statement :
select rtrim('man\emp','\') from dual;
it return man\emp...
so why the function rtrim did nothin ??...
plz help....
thanks.
Re: rtrim problem [message #184129 is a reply to message #184125] Tue, 25 July 2006 08:33 Go to previous messageGo to next message
rajavu1
Messages: 1574
Registered: May 2005
Location: Bangalore , India
Senior Member

Rtrim trims only from the right side ..
here '\' in the middle ..

You can test it with

 SELECT RTRIM('\man\emp\\','\') FROM dual;


Are youl looking for this ???


SELECT REPLACE('man\emp','\') FROM dual;


Rajuvan.

[Updated on: Tue, 25 July 2006 08:36]

Report message to a moderator

Re: rtrim problem [message #184130 is a reply to message #184125] Tue, 25 July 2006 08:34 Go to previous messageGo to next message
joy_division
Messages: 4644
Registered: February 2005
Location: East Coast USA
Senior Member
It did what it was supposed to do. Maybe you need to read up on the RTRIM function again. There is no "\" at the end of your string, so it couldn't trim it.
Re: rtrim problem [message #184212 is a reply to message #184125] Tue, 25 July 2006 14:24 Go to previous message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Basic question
Pure SQL
Why post it in the PL/SQL Experts ???

Moved to SQL & PL/SQL Newbies
Previous Topic: Pass substitution variables from shell script to the SQL
Next Topic: Dynamically Inserting Clob into tables in SP
Goto Forum:
  


Current Time: Sat Dec 10 14:24:05 CST 2016

Total time taken to generate the page: 0.08777 seconds