-1

If im trying to search for 'RYAN'S TEAM' in sql it doesnt like the fact that i have an apostrophe ' in RYAN'S and detects that as the end of the LIKE statement.

    [Team] LIKE '%RYAN'S TEAM%' 

It recognises the whole next line as red in sql server. Is there anyway around this as RYAN'S TEAM is the way it is stored in the database.

Aldwoni
  • 1,168
  • 10
  • 24
Ryan Gadsdon
  • 2,272
  • 4
  • 31
  • 56

1 Answers1

5

This will work:

 [Team] LIKE '%RYAN''S TEAM%' 

You just have to double the quote chars.

sandrooco
  • 8,016
  • 9
  • 48
  • 86