or, since >0 is "not <= 0"
SELECT
RESOURCECODE, CHARVALUE
FROM VWRESOURCEPROPASSIGN
Where
P
CHARVALUE != '0' -- remove 0's
and not charvalue like '-%' -- remove negatives
Main Topics
Browse All TopicsHow can I change the below varchar2 (500)
"CHARVALUE" column so "> 0" works on and
it skips all the non-numeric errors ?
There are 100+ records and only 80
of them can be converted to number.
--------------------------
SELECT
RESOURCECODE, CHARVALUE
FROM VWRESOURCEPROPASSIGN
Where
PROPERTYCODE = 'RSULF' and
CHARVALUE > 0
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
looks like oracle is "helping" you by pushing the outer predicate into the inner view
which then creates invalid conversions
so, go with my second option (small tweak added, making sure they are numbers)
SELECT
RESOURCECODE, CHARVALUE
FROM VWRESOURCEPROPASSIGN
Where PROPERTYCODE = 'RSULF'
and regexp_like(charvalue,'[0-
and CHARVALUE != '0' -- remove 0's
and not charvalue like '-%' -- remove negatives
sdstuber, below also gets "TEXT" records.
How can I extract ONLY "number records" ?
--------------------------
SELECT
RESOURCECODE, CHARVALUE
FROM VWRESOURCEPROPASSIGN
Where
PROPERTYCODE = 'RSULF' and
CHARVALUE != '0' -- remove 0's
and not charvalue like '-%' -- remove negatives
--------------------------
Maybe something like the below ?
SELECT
RESOURCECODE, CHARVALUE
FROM VWRESOURCEPROPASSIGN
Where
PROPERTYCODE = 'RSULF' and
CONVERT TO NUMBER (CHARVALUE > 0 and < 99999999999)
....
A reminder, the above solutions will not use indexes, unless a function based index is used. If the query is a common query on a lot of records, it is possible to create a FBI on the regex for valid numbers, so invalid numbers will not populate the index, plus the query will be more efficient.
Also, the choice of solution above is not good. "simul-post, see above" is not the answer.
Business Accounts
Answer for Membership
by: sdstuberPosted on 2009-10-30 at 08:07:34ID: 25703694
select RESOURCECODE, CHARVALUE 9]')
from (SELECT
RESOURCECODE, CHARVALUE
FROM VWRESOURCEPROPASSIGN
Where
PROPERTYCODE = 'RSULF' and
regexp_like(charvalue,'[0-
) where to_number(charvalue) > 0