Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

how to replace a character in a table in access 2013

Posted on 2014-01-11
5
Medium Priority
?
1,020 Views
Last Modified: 2014-01-12
hi

how can i change - with sql string or vba-  a character in a table to another character, for example i want that in my product table every time that it's find a Apostrophe to change it to a Quotation mark. something like this
replace (ProductName,"'",""")

Open in new window

. but i don't know how update a field with replace function on a query.
0
Comment
Question by:bill201
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 41

Expert Comment

by:Sharath
ID: 39774367
UPDATE YourTable
SET replace (ProductName,"'",""");
0
 

Author Comment

by:bill201
ID: 39774376
it's not working

i get an error message syntax error with in update statement
0
 
LVL 41

Expert Comment

by:Sharath
ID: 39774390
Can you post the exact error message. It is just a simple UPDATE statement.

Reference: http://msdn.microsoft.com/en-us/library/office/bb221186(v=office.12).aspx
0
 

Author Comment

by:bill201
ID: 39774403
hi

this is the code
UPDATE IskitReportTemp
SET replace (ProductName,"'",""");

Open in new window


and the error message it's like i wrote "syntax error with in update statement" i don't get more details
0
 
LVL 51

Accepted Solution

by:
Gustav Brock earned 2000 total points
ID: 39774411
It is:

UPDATE
    IskitReportTemp
SET
    ProductName = Replace([ProductName],"'","""");

/gustav
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Your data is at risk. Probably more today that at any other time in history. There are simply more people with more access to the Web with bad intentions.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

704 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