Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SQL SOS - Please help!

Posted on 2014-01-30
4
Medium Priority
?
274 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 25

Assisted Solution

by:chaau
chaau earned 900 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 900 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 200 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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

With its various features, Office 365 can not only help you with your day-to-day business tasks, it can also do wonders for your marketing campaign.
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

916 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