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 |
|
gagani
Posting Yak Master
112 Posts |
Posted - 2012-05-13 : 12:54:12
|
| I have a list of branches in a table. I need a query to get the list of branches starting from letter 'A' to 'M'. |
|
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2012-05-13 : 13:06:24
|
| [code]SELECT BranchNameFROM YourTableWHERE BranchName like '[A-M]%' --PATINDEX('[A-M]%',BranchName) = 1[/code] |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-05-13 : 13:45:01
|
quote: Originally posted by gagani I have a list of branches in a table. I need a query to get the list of branches starting from letter 'A' to 'M'.
you want to get it as rows or as a single comma seperated list?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|