We help IT Professionals succeed at work.

Update <long text> column in SQL Srvr databse

Medium Priority
562 Views
Last Modified: 2013-12-03
I need to update a long text column in a SQL server database. The text that has to be updated is a script and has a lot of single quotes( ') in them. Any help is appreciated...
Comment
Watch Question

Commented:
Is the script already stored in a variable or column or do you have to update it as a literal value?

Author

Commented:
It is not in a variable, we have to update it as a literal value.
Commented:
In that case just do a find and replace to replace all instances of single quote (') with two single quotes ('') and then enclose the whole value within one pair of single quotes..

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.