-2

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
  • 23
Ryan Gadsdon
  • 2,112
  • 3
  • 25
  • 51

1 Answers1

4

This will work:

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

You just have to double the quote chars.

sandrooco
  • 6,584
  • 7
  • 39
  • 78