• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 447
  • Last Modified:

Check for varchar does not contains character

Hi,

I'd like a query to select rows where a field, called [Value] where it does not contain character "."

For example the table is called "tblMyTable"

Thanks in advance
0
rwallacej
Asked:
rwallacej
1 Solution
 
Carl TawnSystems and Integration DeveloperCommented:
Try:

SELECT [ColumnList] FROM [tblMyTable] WHERE CHARINDEX('.',[Value]) = 0
0
 
tigin44Commented:
try this
SELECT *
FROM tblMyTable
WHERE CHARINDEX('.' ,  [Value]) > 0

Open in new window

0
 
tigin44Commented:
does not contain... so this will be true...
SELECT *
FROM tblMyTable
WHERE CHARINDEX('.' ,  [Value]) = 0

Open in new window

0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
select * from tblMyTable where [Value] not like '%.%';
0
 
rwallacejAuthor Commented:
excellent, thank-you
0
 
rwallacejAuthor Commented:
Qlemo - thank-you for help

tigin44 - thank-you but I got an error with the code, I have used Qlemo's instead
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

Tackle projects and never again get stuck behind a technical roadblock.
Join Now