Solved

sql server query

Posted on 2016-09-07
4
81 Views
Last Modified: 2016-09-07
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
0
Comment
Question by:PeterBaileyUk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 

Author Comment

by:PeterBaileyUk
ID: 41787404
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 ?
0
 
LVL 50

Accepted Solution

by:
Vitor Montalvão earned 500 total points
ID: 41787405
You can use PATINDEX:
SELECT *
FROM tblWords
WHERE PATINDEX('%[0-9]%',Word)=0

Open in new window

0
 

Author Comment

by:PeterBaileyUk
ID: 41787407
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

0
 

Author Closing Comment

by:PeterBaileyUk
ID: 41787408
thank you Vitor
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question