(Optimum) Upgrade database prompted Incorrect syntax near 'S'. Unclosed quotation mark after the character string ''.’

Created by Cheng Kah Poh, Modified on Wed, 11 Nov 2020 at 09:07 AM by Cheng Kah Poh


Root Cause:

Quotation mark (‘) were used as opening and closing in Software’s query

Happened when Company Name exist quotation marks like (ALI’s BAKERS SHOP)


1. Connect to Database use Microsoft SQL Server Management Studio,

Please refer How to Connect to Database use Microsoft SQL Server Management Studio


Please refer How to install Microsoft SQL Management Studio

2. Start a New Query

3. Copy and Paste the following SQL Script into the New Query


UPDATE CompanyProfile

SET BranchCode = '0000'

WHERE CompanyName = 'ALI''s BAKERS SHOP'

--- If Company Name = ALI’s BAKERS SHOP

--- then change it to ALI'’s BAKERS SHOP

4. Execute the Query

5. You may continue to upgrade your database

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article