Solved

SQL SOS - Please help!

Posted on 2014-01-30
4
244 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
Comment Utility
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 119

Accepted Solution

by:
Rey Obrero earned 225 total points
Comment Utility
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 69

Assisted Solution

by:Éric Moreau
Éric Moreau earned 50 total points
Comment Utility
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
Comment Utility
Thank you All :)
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

771 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now