Solved

SQL SOS - Please help!

Posted on 2014-01-30
4
254 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
[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
4 Comments
 
LVL 25

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
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 …

730 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