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

how can i insert with single quote strings?

Status
Not open for further replies.

iostream71

Programmer
Mar 13, 2002
229
US
i have a field that is a varchar, but when i try to do an insert with single quotes, it won't insert. how should i format it to insert correctly
 
Could you post your query here? It should insert if it's within single quotes, so it's supposedly the query that is wrong. //Daniel
 
i think i figured it out. i was trying to simply insert a string that had a single quote, like:

insert into whatever values ('my string \'with quote\'');

i had to format the "'" to "\'"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top