Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8211745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T10:31:53+00:00 2026-06-07T10:31:53+00:00

I am having a SQL query of the form: Update TableName Set TaskStatus=xxx where

  • 0

I am having a SQL query of the form:

Update TableName Set TaskStatus=xxx where TaskID=xx;

I have this SQL query in my C# code.

In an excel file, under B cell, I have a set of statements like Rejected, Completed, Closed and so on. My C# code reads those cells and takes appropriate actions. For example, if it reads Completed, then the below query gets executed:

Update TableName Set TaskStatus=Completed where TaskID=xx;

My problem is, in a cell, I am having the value Can’t Complete. When my code reads this cell and merges this into the query,

 Update TableName Set TaskStatus=Can't Complete where TaskID=xx;

it throws an error stating that “quotes should be closed”
It is assuming the quote in Can’t as a SQL keyword or SQL quotation. How do I get over this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T10:31:54+00:00Added an answer on June 7, 2026 at 10:31 am

    You can replace ' with ''. The quotes define a text, so your code opens, but doesnt close the text ‘area’ by inserting Can't.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having this Linq To SQL query which is taking Customer Category from
I have written a SQL query that works just fine, but am having a
Please help me to form the SQL query... I have a table in DB2
I am having issues with a sql query. I have following table (I simplified
I am having troubles with creating up this sql query to find records having
I'm having a hard time with this SQL Query. I need to convert this
I have a web form having a grid bonded to SQL data source. But
I having trouble in my sql query .Please see my example As u see,
I'm having trouble with a LINQ to SQL query getting the min value using
I'm having an issue extracting a substring in SQL query results. Here's the situation:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.