Link to home
Start Free TrialLog in
Avatar of rwallacej
rwallacej

asked on

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
Avatar of Carl Tawn
Carl Tawn
Flag of United Kingdom of Great Britain and Northern Ireland image

Try:

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

Open in new window

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

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Qlemo
Qlemo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rwallacej
rwallacej

ASKER

excellent, thank-you
Qlemo - thank-you for help

tigin44 - thank-you but I got an error with the code, I have used Qlemo's instead