473,659 Members | 3,239 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Replacing an apostrophe with a space

102 New Member
I want to replace an apostrophe with a space in a SQL field. I have tried this bit does not work:
Expand|Select|Wrap|Line Numbers
  1.  
  2. Update [Record_Retention].[dbo].[Records]
  3. Set    contents = replace(contents, ''''', ' ')
  4. where status='Destroyed' and format='L';
  5.  
  6.  
What am I doing wrong? Thanks
Mar 2 '18 #1
1 1554
sc5502
102 New Member
update [Record_Retentio n].[dbo].[Records]
set contents = replace(content s, '''', ' ')
where format='L' and status='Destroy ed'
Mar 2 '18 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
10433
by: Meyer1228 | last post by:
You all helped me with function keys last week. Thanks so much; your advice was right on. My question now - does anyone have a function that I can use to test my sql statements for the apostrophe and quote and do a search/replace type thing. I'd like something to put in my basFunctions module instead of replacing every time I do a sql command in my program code. Thanks!
13
11388
by: Richard Hollenbeck | last post by:
To prevent future apostrophe bugs and errors, isn't it just simpler to forbid an apostrophe from being entered into a text field? For example, couldn't "Alice's Restaurant" be changed to "Alices Restaurant" etc. automatically and programmatically during data entry? This would eliminate my concatinated strings from producing errors when I base the string on a query. Think this is an example of the "Dreaded Apostrophe Bug." If I enter a...
1
4021
by: Rose | last post by:
Hi all, I'm trying to create a clickable link, but the pesky apostrophe is preventing the link from getting displayed properly. I'm displaying the contents of a folder (with contains the apostrophe), with the filename as a clickable link. The files show up properly, but the link location cuts off at the apostrophe. Here's a code snippet (fi is an instance of FileInfo):
10
4117
by: Bhavna | last post by:
I am using a Replace function to replace single quotes with double when submitting a text field in the database i.e. Replace (q, "'", "' ' ") which works fine. When I retrieve the field from the database which has apostrophe I am getting 'Object expected' error message. Is there a way to fix this? Thanks, Bhavna
1
1587
by: 7736 | last post by:
Good Day.. could someone please help me with some code on how to replace a space with a dot. what i am actually doing is.. when a user gets to change their display name in oracle it gets changed through our metaverse system. users want to use their display names as their email aliases instead
4
6312
by: tcfin | last post by:
Hi, i have a problem to make a transtype from field XX varchar(20), example : 19 200 340,56 to field YY integer, required : 19200340
14
14495
by: Himmel | last post by:
Hello! I am attempting to take data from one table and insert it into another. I am encountering problems where data in a recordset may contain an apostrophe, which completely kills my SQL Insert. DB.Execute "INSERT INTO NEWTABLE (Record1) VALUES('" & rs! & "')" Problem is, some of these records may also be Null, so that kills a Replace() call. I've found a really sloppy way of getting around this, but it's horrendous!
5
1745
by: plumba | last post by:
Ok, the title might not make it clear. I have a javascript code which generates an email. The page is on our corporate intranet so I know it will fire up the email ok. the code looks something like this: var ct9000 = document.getElementById("ct9000").value; var enddate = document.getElementById("105end").value; var fileloc = "file:///S:\folder1\folder2\folder - 3 \document.doc'"; var body_message = "Please run "+job+", details as...
2
1617
by: Joseph J. Kesselman | last post by:
Gabe wrote: You can do exactly that, exactly as you've shown it: <nameJohn Smith</name> But... Now you aren't talking about XML -- you're talking about the behavior of the tool you're passing the XML to.
4
2271
by: Razzbar | last post by:
I'm working on a bookmarklet that grabs information from a page and submits it to a server. Yet another social bookmarking application. I'm having trouble with page titles that include an apostrophe. I'm using encodeURIComponent() around the page title, and again around the URL. Apparently the browser is inserting a backslash before any apostrophe. I can see that when I write the $_GET data to a file in PHP on the server. When the GET...
1
8528
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8627
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7356
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6179
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4335
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1976
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.