Update sql with multiple tables not working

Posted on 2007-08-01
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 92

    Accepted Solution

    UPDATE orders
    SET orders.UnitPriceLessTax=prices.RRPLessTax
    FROM orders, prices
    WHERE orders.itemrefid = prices.itemrefid AND orders.itemrefid = 27705

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
    Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
    Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

    732 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

    20 Experts available now in Live!

    Get 1:1 Help Now