Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Numeric Identifiers

Status
Not open for further replies.

Deltaflyer

Programmer
Oct 11, 2000
184
GB
Is there anyway that i can identify if a field has numeric characters at the end of a string, I am not interested in the data if it has alpha characters as the last 2 digits in the field.

i.e. i want : abc12345, abc12346, abc12347, abc12348
but not : abc123ab, abc123ac, abc123ad, abc123ae

Thanks,
DeltaFlyer ;-)

DeltaFlyer - The Only Programmer To Crash With Style.
 

Replace Fld with applicable column identifier

Code:
IF  isnumeric(substring(Fld,len(Fld)-1,2)) > 0
 select 'Last two characters of Fld Numeric'
else
 select 'Non-numeric'


Mark
 
Thanks mark. DeltaFlyer ;-)

DeltaFlyer - The Only Programmer To Crash With Style.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top