Solved

SQL SOS - Please help!

Posted on 2014-01-30
4
249 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …

809 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