Solved

SQL Query

Posted on 2014-10-11
3
158 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

774 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