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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2004-04-27 : 08:56:24
|
| Deep writes "i want to use in and like operator together in a single sql statement" |
|
|
samsekar
Constraint Violating Yak Guru
437 Posts |
Posted - 2004-04-27 : 10:48:39
|
| HTH..SElect * from northwind..employees where employeeid in (2,9) or LastName like 'pea%' or lastname like 'Buch%'- Sekar |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2004-04-28 : 13:50:30
|
$1000US They want to doSELECT * FROM Orders WHERE CustomerID LIKE ('VI%','TO%')Nope...BUT!USE NorthwindGOCREATE TABLE myTable99(Col1 char(2))INSERT INTO myTable99(Col1)SELECT 'VI' UNION ALL SELECT 'TO'SELECT * FROM Orders o INNER JOIN myTable99ON CustomerID LIKE Col1+'%' GODROP TABLE myTable99GO Should float your boat...Brett8-) |
 |
|
|
|
|
|