本文介绍了更新记录,未找到或更改行。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到更新问题。有些记录可以更新。有些则不是。我在这里阅读了一些线程,据我所知,因为数据自获取以来已被更改。针对db运行的SQL是:


SELECT [t0]。[Name],[t0]。[PostAdressRow1],[t0]。[PostAdressRow2 ],[t0]。[PostAdressPostnumber],[t0]。[PostAdressPostort],[t0]。[VisitAdressRow1],[t0]。[VisitAdressRow2],[t0]。[VisitAdressPostnumber],[t0]。[VisitAdressPostort], [t0]。[Organisationsnr],[t0]。[SNICode] AS [SNICode1],[t0]。[NumberOfEmployees],[t0]。[CalculatedTurnover],[t0]。[CustomerID],[t0]。[CRMCustomerID ],[t0]。[KreditRating]

I have a problem with a update. Some records is possible to update. And some are not. 

I have read some threads here and from what i understand it is because the data has been changed since the fetch. The SQL running against the db is:

SELECT [t0].[Name], [t0].[PostAdressRow1], [t0].[PostAdressRow2], [t0].[PostAdressPostnumber], [t0].[PostAdressPostort], [t0].[VisitAdressRow1], [t0].[VisitAdressRow2], [t0].[VisitAdressPostnumber], [t0].[VisitAdressPostort], [t0].[Organisationsnr], [t0].[SNICode] AS [SNICode1], [t0].[NumberOfEmployees], [t0].[CalculatedTurnover], [t0].[CustomerID], [t0].[CRMCustomerID], [t0].[KreditRating]

FROM [dbo]。[CRMCustomer] AS [t0]

FROM [dbo].[CRMCustomer] AS [t0]

WHERE [t0]。[Organisationsnr ] = @ p0

WHERE [t0].[Organisationsnr] = @p0

- @ p0:输入BigInt(大小= 0; Prec = 0; Scale = 0)[5562756212]

-- @p0: Input BigInt (Size = 0; Prec = 0; Scale = 0) [5562756212]

- - 上下文:SqlProvider(Sql2005)模型:AttributedMetaModel Build:3.5.21022.8

-- Context: SqlProvider(Sql2005) Model: AttributedMetaModel Build: 3.5.21022.8

UPDATE [dbo]。[CRMCustomer]

UPDATE [dbo].[CRMCustomer]

SET [姓名] = @ p0

SET [Name] = @p0

WHERE 0 = 1

WHERE 0 = 1

SELECT [t1]。[CRMCustomerID]

SELECT [t1].[CRMCustomerID]

FROM [dbo]。[CRMCustomer] AS [t1]

FROM [dbo].[CRMCustomer] AS [t1]

WHERE((@@ ROWCOUNT)> 0)AND([t1]。[Organisationsnr] = @ p1)

WHERE ((@@ROWCOUNT) > 0) AND ([t1].[Organisationsnr] = @p1)

- @ p0:输入NChar(尺寸= 50; Prec = 0;比例= 0)[3]

-- @p0: Input NChar (Size = 50; Prec = 0; Scale = 0) [3]

- @ p1:输入BigInt(大小= 0; Prec = 0;比例= 0)[5562756212]

-- @p1: Input BigInt (Size = 0; Prec = 0; Scale = 0) [5562756212]

- 上下文:SqlProvider(Sql2005)模型:AttributedMetaModel Build:3.5.21022.8

-- Context: SqlProvider(Sql2005) Model: AttributedMetaModel Build: 3.5.21022.8

推荐答案


这篇关于更新记录,未找到或更改行。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 17:22
查看更多