Update sql with multiple tables not working

Posted on 2007-08-01
Medium Priority
Last Modified: 2008-02-01
I am trying to execute the following query within a SQL server 2005 express database:

   AND orders.itemrefid=27705

Unfortunately I get a syntax error near the comma.

Question by:mike99c
1 Comment
LVL 93

Accepted Solution

Patrick Matthews earned 2000 total points
ID: 19614134
UPDATE orders
SET orders.UnitPriceLessTax=prices.RRPLessTax
FROM orders, prices
WHERE orders.itemrefid = prices.itemrefid AND orders.itemrefid = 27705

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Microsoft provides a rich set of technologies for High Availability and Disaster Recovery solutions.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
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.
Suggested Courses

569 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