PaMcD
PaMcD

Reputation: 115

Find string like 0-9 or plus or space or hypen in T-Sql?

At the moment I have it as

Example like '[0-9+ ]' OR Example like '%-%'

is it possible to have this in 1 like statement? or there is a good resource anywhere, where i can read up instead of having to ask possibly stupid questions?

Thanks

Upvotes: 0

Views: 1536

Answers (1)

Sandr
Sandr

Reputation: 776

Actually you can combine all in the one LIKE operator as LIKE '%[0-9+ -]%'

Possible options of LIKE usage can be found here: http://technet.microsoft.com/en-us/library/ms179859.aspx

Upvotes: 1

Related Questions