Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Searching for a name with an apostophe

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Can someone help me. I need to search a SQL table for the name "O'Niell" using LIKE.

I can't do a

SELECT * FROM employees WHERE name LIKE 'O'Niell%'
- or -
SELECT * FROM employees WHERE name LIKE "O'Niell%"

so how would I do this.

CR
 
Try using two consecutive apostrophes:

SELECT * FROM employees WHERE name LIKE 'O''Niell%'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top