Consultor Eletrônico



Kbase P126847: How to do a SELECT of field values containing only numeric characters?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/9/2007
Status: Unverified

GOAL:

How to do a SELECT of field values containing only numeric characters?

GOAL:

How to do a SELECT of field values containing only numbers?

GOAL:

How to do a SELECT to filter out field values containing only numbers?

FACT(s) (Environment):

Progress 9.x
OpenEdge 10.x
All Supported Operating Systems

FIX:

Here are two examples of how to do a SELECT that will return field values containing only numeric characters:
example 1:
SELECT * from PUB.TABLE1 where TRANSLATE(PUB.TABLE1.COL2,'0123456789', ' ') = ' ';

example 2:
SELECT * from PUB.TABLE1 where LTRIM(PUB.TABLE1.COL2,'0123456789') = '';