我在MS Access中创建了一个更新查询。在查询中有两个表。一个是我想要更新的表(000DeleteMeNames
),另一个是Sharepoint(Work Orders
)中的链接表(它实际上是一个列表)。每次运行查询时,它都会执行它应该执行的操作并更新000DeleteMeNames
,但它也会修改Sharepoint列表Work Orders
中的已连接记录。不会对Sharepoint记录进行实际更改,但修改日期会更改,并且会向我发送一个警报,表明Sharepoint记录已更改。
UPDATE 000DeleteMeNames INNER JOIN [Work Orders]
ON WO_Num = [Work Orders].[Work Order Number])
AND ([000DeleteMeNames].[Date-Forecast] = [Work Orders].[Work Order Date])
SET [000DeleteMeNames].DummyField = [Work Orders].[Manager];
有没有办法更改我的SQL,以便不更新Sharepoint列表,只更新000DeleteMeNames
表中的Access原生记录?我在上面的SQL中做错了吗?提前谢谢。
答案 0 :(得分:0)
Try this:
UPDATE 000DeleteMeNames
SET [000DeleteMeNames].DummyField = [Work Orders].[Manager]
FROM 000DeleteMeNames INNER JOIN [Work Orders]
ON WO_Num = [Work Orders].[Work Order Number])
AND ([000DeleteMeNames].[Date-Forecast] = [Work Orders].[Work Order Date]);