Home » SQL & PL/SQL » SQL & PL/SQL » To remove the special character from the starting of the string (merged) (9i)
To remove the special character from the starting of the string (merged) [message #426163] Wed, 14 October 2009 04:26 Go to next message
boopathi.it
Messages: 9
Registered: November 2007
Location: chennai
Junior Member

Hi,

In the below query i want to remove the first three special from the string.

note :/// is not fixed.

SELECT TO_CHAR('///gggg///') a FROM dual

output:
-------
gggg///


SELECT TO_CHAR('//////gggg///') a FROM dual

output:
-------
gggg///

It possible to achieve the result without creating the function.

Many thanks
Boopathi.

Re: To remove the special character from the starting of the string [message #426166 is a reply to message #426163] Wed, 14 October 2009 04:31 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
LTRIM

Regards
Michel
Re: To remove special character from string [message #426168 is a reply to message #426163] Wed, 14 October 2009 04:33 Go to previous message
Its_me_ved
Messages: 979
Registered: October 2009
Location: India
Senior Member
use INSTR & SUBSTR
Find the 1st position of g using INSTR
and then use SUBSTR ..

Please do not multipost. See Michel Sir's reply. LTRIM would be more useful then this

[Updated on: Wed, 14 October 2009 04:37]

Report message to a moderator

Previous Topic: Tips (merged 5)
Next Topic: utl_smtp question?
Goto Forum:
  


Current Time: Sun Dec 04 22:45:51 CST 2016

Total time taken to generate the page: 0.08579 seconds