473,419 Members | 1,645 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,419 software developers and data experts.

Query works in Access but not in SQL Server

I have two tables, custmast and custaddlinfo. I want to update a field in custaddlinfo, ISPIWebDirectory. Both tables have a common field, custnumber. But I want to select only the records for custaddlinfo where custmast.company name = "ACME" the following SQL statement works in Access but does not work in SQL Server. I get the following errors:

Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'INNER'.
Msg 102, Level 15, State 1, Line 4
Incorrect syntax near 'custmast'.

Here is my command
Expand|Select|Wrap|Line Numbers
  1. UPDATE custmast 
  2. INNER JOIN custaddldetail ON custmast.customernumber = custaddldetail.CustomerNumber 
  3. SET custaddldetail.ISPIWebDirectory = "download00853_acme"
  4. WHERE (custmast.companyname="ACME") AND (custmast.customernumber Like "ACME%");
May 27 '10 #1
1 1377
ck9663
2,878 Expert 2GB
Check your UPDATE syntax....

Happy Coding!!!

~~ CK
May 27 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: | last post by:
I use MySQL from my php page and from phpMyAdmin. In Windows Server, following query works fine. In Linux Server instead it returns error. The SQL Query is: SELECT DISTINCT a.id, a.container,...
3
by: jeremy | last post by:
Hello. I have an asp.net application that resides on a non-DC / BDC Sharepoint Server (although it is logged into the domain). The application will perform lookups based on the current user...
2
by: Mattyboy | last post by:
Guys I have built a database with saved queries that runs fine in Access but when I call it from the web using ASP, an exception occurs. I have tried multiple ways of testing the databases with...
8
by: s_wadhwa | last post by:
SELECT DISTINCTROW "01C" AS dummy, Buildings.BuildingNumber, UCASE(Buildings.BuildingName) AS BuildingName, Buildings.MasterPlanCode, Buildings.UniformBuildingCode,...
4
by: ShastriX | last post by:
Getting a weird error while trying out a query from Access 2003 on a SQL Server 2005 table. Want to compute the amount of leave taken by an emp during the year. Since an emp might be off for...
9
by: timber910 | last post by:
Hello, I've been working on this for days and have been able to find anything to help me solve the problem. Here is my SQL query. Select FISCALMONTH.id, FISCALMONTH.qtr_year,...
2
by: Cindy | last post by:
I have an Access 2003 database with a query that works fine on my PC but does not work on another PC. My PC has older versions of Access installed as well as 2003 - the other PC only has Access...
5
by: Jim | last post by:
I'm a vb.net newbie. I have an query that is entirely within an Access database. It's a simple update query - "usp_Append_tbl_RefNos". It works in Access, How can I run that query from a vb...
1
by: rune | last post by:
Hi I'm trying to convert an SQL Query from Access to SQL Server. The Access Query goes like this: SELECT Format(EntryDate, 'ddd mm dd') AS FROM JournalEntries This query returns the name...
9
by: anthony | last post by:
In Access 2007, why does a query field designed as Term: ! ! return 00:00:00 when cboTerm actually contains 08SP. This works as expected in Access 2003?
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.