0

How would I go about doing something like:

SELECT * FROM mytable
WHERE people IN ('Jack', '%Bob%')

Finding all fields that either equal 'Jack' or contain 'Bob'? I don't think my example is the proper syntax because it's not pulling up any records.

Aldwoni
  • 1,168
  • 10
  • 24
Norse
  • 5,674
  • 16
  • 50
  • 86
  • possible duplicate of [SQL Server using wildcard within IN](http://stackoverflow.com/questions/1076097/sql-server-using-wildcard-within-in) – McGarnagle May 05 '12 at 20:45

1 Answers1

4

Simply :

SELECT * FROM mytable WHERE people='Jack' OR PEOPLE LIKE '%Bob%'
Denys Séguret
  • 372,613
  • 87
  • 782
  • 758