Solved

how to replace a character in a table in access 2013

Posted on 2014-01-11
5
974 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 50

Accepted Solution

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

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

/gustav
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
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…

734 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