[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: SQR command to distinguish alpha characters from aplha-numer



Here is one way you could do it:

if translate($string1, '0123456789', '') <> $string1
  show 'string1 is alpha-numeric'
end-if

> -----Original Message-----
> From: Zubin Shroff [SMTP:zshroff@DTTUS.COM]
> Sent: Monday, July 12, 1999 5:50 PM
> To:   Multiple recipients of list SQR-USERS
> Subject:      SQR command to distinguish alpha characters from
> aplha-numer
>
>      Is there an SQR command that can be used to interrogate a field
> and
>      determine whether all characters are alphabets or alpha-numeric?
>
>      e.g. Given 2 field values of 'JOB' and 'JOB9', we need to
> determine
>      that JOB is alpha-only and JOB9 is alpha-numeric.
>
>      Just wondering if there is an easier way than to read each
> character
>      and look for the first non-alpha character