Home » SQL & PL/SQL » SQL & PL/SQL » Searching for a character
Searching for a character [message #38532] Wed, 24 April 2002 20:51 Go to next message
sulinder singh
Messages: 10
Registered: January 2002
Junior Member
Hi,
I have a column with values char,number and speacial charatter, for eg 'terr8596)-'
These sequence of character , number and then character is anything, can anyone tell me how do i fetch just the number values from the column.
What i need is really a replace kind function which performs a task of finding number in the column

Thanks and regards

Sulinder Singh
Re: Searching for a character [message #38533 is a reply to message #38532] Wed, 24 April 2002 22:30 Go to previous message
Amit
Messages: 166
Registered: February 1999
Senior Member
--try this

--for non-alphabets

select f1 from tablename
where lower(f1)=upper(f1)

--for numbers only

select * from t
where translate( field_name, '0123456789',
rpad( 'x', 10, 'x' ) ) = rpad( 'x', length(field_name), 'x' ) ;
Previous Topic: How to upadate a table when oracle session terminates abruptly
Next Topic: Sum with nesting
Goto Forum:
  


Current Time: Thu Mar 28 12:41:14 CDT 2024