Solved

Update in Tsql Stmt

Posted on 2013-01-07
2
405 Views
Last Modified: 2013-01-07
I have the following Tsql statement , however, since it has a single quote in it, it wont work. How do I go about replacing like what I have below.

update dbo.TABLE
set TITLE = 'E'
where TITLE = 'BA'S OFFICE'

Thanks
0
Comment
Question by:Tech315
2 Comments
 
LVL 15

Accepted Solution

by:
Anuj earned 315 total points
ID: 38751263
update dbo.TABLE
set TITLE = 'E'
where TITLE = 'BA''S OFFICE'

Open in new window

0
 

Author Closing Comment

by:Tech315
ID: 38751296
Thanks :)
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Access SQL Server instance by NONE-admin Windows user 12 28
Syntax error with Dates where clause 10 41
how to just get time from a date 6 32
SQL Query 2 31
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how the fundamental information of how to create a table.

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question