Home » SQL & PL/SQL » SQL & PL/SQL » get columns consisting of only numbers (10g on windows 2003 server)
get columns consisting of only numbers [message #424608] Sun, 04 October 2009 10:17 Go to next message
kang
Messages: 89
Registered: November 2007
Member

to avoid ora-01722 error,
I want to get columns consisting of only numbers.
so I came up with regexp_like
regexp_like('441241341','^[url=http://www.orafaq.com/wiki/:digit:]:digit:[/url]*$')


is this good?

TIA
Re: get columns consisting of only numbers [message #424610 is a reply to message #424608] Sun, 04 October 2009 10:24 Go to previous message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
>is this good?
It depends upon the definition of "good".
Most likely the result is a Full Table Scan.
Therefore goodness is in the eye of the beholder.

Alternatively, declare column as type NUMBER & Oracle will never throw ORA-01722 while SELECT it.

[Updated on: Sun, 04 October 2009 11:13]

Report message to a moderator

Previous Topic: lag and lead only for numbers ?
Next Topic: How to decrease time of inserting large data
Goto Forum:
  


Current Time: Sat Dec 10 09:25:39 CST 2016

Total time taken to generate the page: 0.08370 seconds