Solved

Access Database-Update Query Error - Cannot Update

Posted on 2014-01-15
2
154 Views
Last Modified: 2014-03-21
I have been having problems with what I thought was an  easy update query, using the following query, and the error prompt simply says it cannot update database.  I have tested this code many times trying to run an update query to replace existing staging table values with mapped values.  Appreciate it if anyone can help.

The SQL Code is as follows:

UPDATE stgOutcomeDataUpload
SET stgOutcomeDataUpload.SPassABC = (SELECT  lkpStage4FieldMappings.FieldValue
FROM  lkpStage4FieldMappings, stgOutcomeDataUpload
WHERE stgOutcomeDataUpload.SPassABC = lkpStage4FieldMappings.FieldString AND (((lkpStage4FieldMappings.FieldName)="SPassABC")));


thanks
0
Comment
Question by:yasanthax
[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 Comments
 
LVL 25

Accepted Solution

by:
chaau earned 150 total points
ID: 39783997
Your query is incorrect. Try this one:
UPDATE stgOutcomeDataUpload  
INNER JOIN lkpStage4FieldMappings 
ON stgOutcomeDataUpload.SPassABC = lkpStage4FieldMappings.FieldString 
SET stgOutcomeDataUpload.SPassABC = lkpStage4FieldMappings.FieldValue
WHERE lkpStage4FieldMappings.FieldName="SPassABC";

Open in new window

0
 

Author Comment

by:yasanthax
ID: 39792406
Sorry for the late response.  This works.  May thanks.
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

As they say in love and is true in SQL: you can sum some Data some of the time, but you can't always aggregate all Data all the time! Introduction: By the end of this Article it is my intention to bring the meaning and value of the above quote to…
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

726 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