Home » SQL & PL/SQL » SQL & PL/SQL » Number
Number [message #392256] Tue, 17 March 2009 03:26 Go to next message
blood98
Messages: 14
Registered: January 2009
Location: Thai
Junior Member

IF I HAVE WORD 'A2E33WWEE123'
I WANT A NUMBER IS THIS WORD
INPUT = A2E33WWEE123
OUTPUT = 233123
Re: Number [message #392257 is a reply to message #392256] Tue, 17 March 2009 03:37 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Look at the Translate function.

And please don't post in upper case.
Re: Number [message #392260 is a reply to message #392256] Tue, 17 March 2009 03:47 Go to previous message
joicejohn
Messages: 327
Registered: March 2008
Location: India
Senior Member
@blood98,

What is your Oracle Version? If it is 10g or above you can rely on Regular Expressions also.

SQL> SELECT REGEXP_REPLACE ('A2E33WWEE123', '[A-Z]+', '')
  2    FROM DUAL;

REGEXP
------
233123


Please read and follow the guidelines in OraFAQ Forum Guide before your next post.

Hope the following link helps:
Writing Better SQL Using Regular Expressions

Regards,
Jo
Previous Topic: ORA-01704: string literal too long in lob columns
Next Topic: searching
Goto Forum:
  


Current Time: Sat Dec 10 10:40:00 CST 2016

Total time taken to generate the page: 0.09762 seconds