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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quotes as part of the string in a SQL statement

Status
Not open for further replies.

amarti44

Programmer
Joined
Feb 16, 2001
Messages
23
Location
US
Hi:

I hope somebody can help me. I'm new to SQL and I'm trying to send an SQL string in VB like this:

MySQL = "SELECT * FROM Visitor WHERE Last_name LIKE 'O'Farriel'.....

where O'Farriel is a last name with a single quote as part of the last name.
How can I make the SQL statement to understand the entire last name and not only 'O'.

Thanks in Advance

Alberto
 
brackets like "0[']farriel" should do it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top