OL Learn

Database Query Plugin - nvarchar(max) and varchar(max)

When I encounter a nvarchar(max) and varchar(max), I get this error. Running 2019.1

W3612 : Error running SQL: Invalid field size

I’ve found that most of the times I can get around the issue if the nvarchar(max) and varchar(max) is the last field in the query. Of course if I have more than one nvarchar(max) and varchar(max) this method is out the window.

Setting nvarchar(max) to nvarchar(4000) works instead works. The issue appears to be support for (MAX) .

Any idea why or if there is a resolution insight?