On Mon, Sep 17, 2012 at 12:41 PM, Luis Rodriguez <luisro58@xxxxxxxxx> wrote:
SELECT * FROM TEXTFILE WHERE TRANSLATE(TEXT, ' ',
'1234567890') = ' '
If the result is ' ', the field contains only numbers.
But he wants to find fields which can contain both text and numbers,
and the numbers contained are 9 digits long.
This is another one of those "easy to do with regular expressions"
problems that is more convoluted if you don't have regex.
Off the cuff, I'd say your approach could still be used, sort of, in two steps:
First, convert all the digits to some "conspicuous" character
(preferably one that can't appear in the data anywhere else). Second,
search for a string of 9 of those characters.