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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting records with where clause

Status
Not open for further replies.

dmacuk

Programmer
Jan 27, 2006
2
GB
I have a char(10) field which can contain either a mixture of letters/numbers, or numbers only, e.g. 'ABC123' or '0000123'.

Is there a where condition to only select the records which contain all numbers

TIA

David Mcallum
 
there is, but it will not be very speedy query

WHERE code ~ '^[0-9]*$'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top