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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Multiple Likes in Where Statements

Author  Topic 

stormcandi
Starting Member

46 Posts

Posted - 2007-12-03 : 18:30:08
Hello all,
I am trying to find out how I might be able to put multiple conditions in a single like statement. Similar to this:

Select FName, LName
From Users
Where LName Like ('A%','B%','C%')

In this example all Last Names beginning with A, B, or C would be listed in the resultset.


I appreciate any help that can be offered.

stormcandi
Starting Member

46 Posts

Posted - 2007-12-03 : 18:39:31
Ok, I got it now.

s.lname like ('[A-C]%')
Go to Top of Page
   

- Advertisement -