2

I'm ingesting data into IBM MDM and we are finding source records with row key's containing an apostrophe (') which MDM cannot accept and therefore rejects the records. I want to query the source records to count how many records are affected, but with SQL apostrophes open and close text strings. Is there a way to make a query like

select count (*) from table1 where field1 like '%'%' ;

Basically, I want to be able to search for a string of letters that have an apostrophe in it like...roundy's

Nadeem Ayoob
  • 45
  • 1
  • 7

2 Answers2

1

Use backslash to escape special characters. To get aa'bb use aa\'bb.

Escape characters

Marek Vitek
  • 1,573
  • 9
  • 20
1

" instead of ' will get you what you want

victor
  • 93
  • 1
  • 1
  • 10