Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SQL Query

Posted on 2014-10-11
3
Medium Priority
?
166 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
[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
3 Comments
 
LVL 70

Assisted Solution

by:Éric Moreau
Éric Moreau earned 1000 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 66

Accepted Solution

by:
Jim Horn earned 1000 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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
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 SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

688 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