Solved

SQL SOS - Please help!

Posted on 2014-01-30
4
251 Views
Last Modified: 2014-01-30
Hello Gurus,

Please assist – what’s wrong in this syntax for update query – can you tell me?


 UPDATE a
    Set a.someCode  = b.someCode
    From tblITEM as a inner join  tblJUNCTION as b on a.ItemCode
 = b.ItemCode

Thank you
0
Comment
Question by:Rayne
4 Comments
 
LVL 24

Assisted Solution

by:chaau
chaau earned 225 total points
ID: 39822875
Nothing wrong if it was an SQL Server query. Access does not like these queries. For Access you would write it like this:
UPDATE tblITEM inner join  tblJUNCTION on tblITEM.ItemCode = tblJUNCTION.ItemCode  
Set tblITEM.someCode  = tblJUNCTION.someCode

Open in new window

0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 225 total points
ID: 39822879
here  is the correct format

UPDATE tblITEM as a inner join  tblJUNCTION as b
on a.ItemCode  = b.ItemCode
    Set a.someCode  = b.someCode
0
 
LVL 70

Assisted Solution

by:Éric Moreau
Éric Moreau earned 50 total points
ID: 39822892
what is the error?

You run this on SQL Server?

I would try:
 UPDATE a
    Set someCode  = b.someCode
    From tblITEM as a inner join  tblJUNCTION as b on a.ItemCode
 = b.ItemCode
0
 

Author Closing Comment

by:Rayne
ID: 39822896
Thank you All :)
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

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.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…

829 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