我有一张表,我需要根据另一个表中的信息进行更新。我写了一个精选的查询,它能够很好地工作,并显示我需要摆脱的内容,但是当我尝试将其更改为更新查询时,我在Join中遇到错误。我希望有人能够向我指出一个简单的疏忽。在SQL Server 2005 express中使用连接
这里是工作的选择查询:
select *
from CustPayShdul
JOIN ARcreditapply
ON ARcreditapply.AplyedRefNo = CustPayShdul.ReferNo AND ARcreditapply.AplyedLocation = CustPayShdul.LocationNo
AND ARcreditapply.sequence2 = CustPayShdul.Paysequence
where ARcreditapply.PaidDate < '1/1/2012' and ARcreditapply.PaidDate < CustPayShdul.InvDate
这里是更新查询,返回一个错误:
update custpayshdul
set custpayshdul.payablebalance = custpayshdul.amount
JOIN ARcreditapply
ON ARcreditapply.AplyedRefNo = CustPayShdul.ReferNo AND ARcreditapply.AplyedLocation = CustPayShdul.LocationNo
AND ARcreditapply.sequence2 = CustPayShdul.Paysequence
where ARcreditapply.PaidDate < '1/1/2012' and ARcreditapply.PaidDate < CustPayShdul.InvDate
**这些错误是什么**?请给我们确切的完整的错误信息.... – 2012-02-08 20:33:41