Unable to read Database details if it has nvarchar(max) column in it

Hi, I am trying to read the ms sql database table which has multiple columns and few of the columns are defined with nvarchar(max) data type. I am executing a simple select query but getting error as below,

Note: I already checked this table and it do not have any constraints or violating the keys, also the same select query works from ssql studio.

Then, I changed nvarchar(max) to nvarchar(1000) as data type of the column, then the select query works.

Can someone please let me know is this only workaround or any way we can still read database table with nvarchar(max) column ?

Hi @gowtham_mit ,

If you need to work with the complete contents of the nvarchar(max) column and the limitation is specific to the tool or library you are using, you can try retrieving the data in smaller chunks.

Instead of retrieving the entire column’s data in a single query, you can break it down into multiple queries, each fetching a portion of the column’s data.

Also if you are using nvarchar(1000) you may lose data if data exceeds the specified length(1000)