0

How to convert Nvarchar(Max) to BLOB?

A SQLServer view have been using in Oracle through Databaselink. One of the text column datatype is NVARCHAR(MAX) and when I checked the max Lenght of Text column is 52000 characters. If I use NVARCHAR(MAX) causing issues in Oracle while accessing the view and when I tried to change to NVARCHAR(60000) its popping up error as invalid data lenght. How to solve this issue?

K.Tom
  • 175
  • 1
  • 6
  • 16
  • nvarchar max = 4000 characters, while varchar 8,000 bytes, but if you use VARCHAR(MAX) then it means that it'll use the maximum storage size (default is 2GB). so you need to use varchar in your case to solve your issue. – iSR5 Mar 08 '18 at 23:22
  • @iSR5 If I use VARCHAR it limits to only 8000 characters but Length of Text field is approx 40,000 characters – K.Tom Mar 09 '18 at 15:47
  • you had it wrong, VARCHAR limits 8000 bytes and not characters. So, the actual length in varchar depends on the characters encoding and how many bytes it reserved. – iSR5 Mar 09 '18 at 17:26

0 Answers0