Solved

how to replace a character in a table in access 2013

Posted on 2014-01-11
5
956 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
  • 2
  • 2
5 Comments
 
LVL 40

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 40

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 49

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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
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…

830 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