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.

John

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.