Hi all,
Please provide me a solution to insert the text which has apostrophe. Example : aaab's.

Messages:
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'GH'.
Msg 105, Level 15, State 1, Line 1
Unclosed quotation mark after the character string ')
'.
Thanks in advance.
Grahamamie
- Login or Signup Now to post comments

Yes, that is a problem many users of SQL face. Using an apostrophe in the code, requires a small and easy task. It needs to be done just as in the HTML code, which you code. You should replace each apostrophe with two, so that you can insert an apostrophe into the code.
For example if you want to insert an apostrophe into the code try the following:
Insert into foo (name) values ('duncan o''toole")
Cheers.
Or Using most of the programming language by replacing the single quotes with a double qoute by use of replace function. for example in vb.net as shown below:
Thank you both for the help.