Skip to content
Advertisement

sql exception : The statement has been terminated

I’m running this SQL statement

exec sp_executesql
  N'UPDATE dbo.PricingProfileRuleSetCondition
SET    RuleGroup = @p0,
       JoinClause = @p1,
       ColumnName = @p2,
       Operator = @p3,
       Value = @p4,
       RuleSetId = @p5
WHERE  Id = @p6',
N'      @p0 int,
        @p1 nvarchar(4000),
        @p2 nvarchar(4000),
        @p3 nvarchar(4000),
        @p4 nvarchar(4000),
        @p5 bigint,
        @p6 bigint'
,
@p0=0,
@p1=N'And',
@p2=N'DMS.Finance.Entities.PartnerAccountTransactionAmountType.EnglishName',
@p3=N'eq',
@p4=N'dsaf',
@p5=4,
@p6=6  

and I’m getting

Msg 8152, Level 16, State 2, Line 1
String or binary data would be truncated.
The statement has been terminated.

help,please

Advertisement

Answer

A string you are trying to insert is longer than the max nr of charachters. E.g. like a string with 4001 charachters in a varchar(4000) datatype.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement