Solved

SQL Query

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

Assisted Solution

by:Éric Moreau
Éric Moreau earned 250 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks for the help. Statement ran perfectly!
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
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.

728 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now