Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
cognos79
Posting Yak Master
241 Posts |
Posted - 2007-08-22 : 17:56:38
|
I have a column: NAME. I need to find the all the names starting with letters A until M. Do i have to use regular expressions??? |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-08-22 : 18:04:07
|
Are "m" names included?SELECT * FROM Table1 WHERE Name >= 'a' AND Name < 'n' -- mcdonalds includedSELECT * FROM Table1 WHERE Name >= 'a' AND Name < 'm' -- mcdonalds excluded E 12°55'05.25"N 56°04'39.16" |
 |
|
uday.sql
Starting Member
3 Posts |
Posted - 2007-08-23 : 18:44:37
|
This is also good.SELECT * FROM Table1 WHERE Name LIKE '[A-M]%' |
 |
|
|
|
|