sql server query

PeterBaileyUk
PeterBaileyUk used Ask the Experts™
on
I am not sure how to create an sql server query that will return the strings that have no numeric characters in them and then another that has ability to return mixed i.e A'4'.

The field word only holds one word.

so:
'0'
'001001101'
'F1'
'1f'
 would not be returned

words :

'sweeper'
'bhp'

would be returned the field name is word from Tblwords
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
ive just tried:
use Dictionary
select word
from TblWords
where word is not null and word not like'%[0-9]'
group by word
order by word

Open in new window


thats giving me where there is mixture of alpha numeric.

thats one part done

the alpha characters only i cannot word out can i do A-z ?
IT Engineer
Distinguished Expert 2017
Commented:
You can use PATINDEX:
SELECT *
FROM tblWords
WHERE PATINDEX('%[0-9]%',Word)=0

Open in new window

Author

Commented:
and failed with this:
use Dictionary
select word
from TblWords
where word is not null and word like'[A-Z][a-z]'
group by word
order by word

Open in new window

Author

Commented:
thank you Vitor

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial