


Oracle is allowed to push the predicate into the subquery and then evaluate the conditions in whatever order it deems appropriate. Unfortunately, the various subquery approaches that have been proposed are not guaranteed to work. I just don't understand what is happening! It should be filtering out all the records that are invalid numbers and 100 is obviously a number. This seems to work when I run just a preview, but I get an 'invalid number' error when I add a filter of. Then I use a decode statement to set a little code to filter on. The translate replaces all numbers with spaces so that a trim will result in null if the field only contained numbers. I want to return just the rows with valid numbers in person_uid. For instance, one row might have a person_uid of '2-lkjsdf' and another might be 1234567890. This person_uid field is a varchar2 but contains valid numbers for some rows and in-valid numbers for other rows. This table has a field called person_uid.
