Wednesday, 21 November 2018

MSSQL - Fix Error - The size (5000) given to the parameter '@test' exceeds the maximum allowed (4000).



Msg 2717, Level 16, State 2, Line 1
The size (5000) given to the parameter '@test' exceeds the maximum allowed (4000).

watch solution on YouTube

To Fix it replace
Declare @test nvarchar(5000);
Set @test = N'very long string';
Select @test;

with

Declare @test nvarchar(max);
Set @test = N'very long string';
Select @test;

No comments:

Post a Comment