Solved

SQL Query

Posted on 2014-10-11
3
159 Views
Last Modified: 2014-10-11
I have an Access query (below) I'd like to run in Sql Server but of course the syntax is incorrect. Can anyone help me with what it should actually be?

UPDATE tempMeals_In INNER JOIN Routes ON (tempMeals_In.ST_Site = Routes.GId) AND (tempMeals_In.mls_route_fk = Routes.MobileDeviceId) SET tempMeals_In.ST_Route = [RId];
0
Comment
Question by:SpaceCoastLife
3 Comments
 
LVL 70

Assisted Solution

by:Éric Moreau
Éric Moreau earned 250 total points
ID: 40374876
is this query really valid in Access?

Try:
UPDATE tempMeals_In 
SET ST_Route = [RId]
from tempMeals_In 
INNER JOIN Routes ON (tempMeals_In.ST_Site = Routes.GId) AND (tempMeals_In.mls_route_fk = Routes.MobileDeviceId) 

Open in new window

0
 
LVL 65

Accepted Solution

by:
Jim Horn earned 250 total points
ID: 40374888
The above answer is correct, so instead of adding two cents I'll mention If you're doing a lot of Access to SQL query conversion I have an article out there on Migrating your Access Queries to SQL Server Transact-SQL that's a grab bag of syntax differences.
0
 

Author Closing Comment

by:SpaceCoastLife
ID: 40374897
Thanks for the help. Statement ran perfectly!
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

820 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