Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

NVARCHAR(MAX) script transformation

$
0
0

I have a DFT source - sql table containing a column Description with data type nvarchar(max) .

Using a data conversion task to convert to Unicode text stream(dt_ntext)
Am using text stream because converting to Unicode string (dt_wstr) throws error runtime that text was truncated.

select

max(len(Description))from[dbo].[tbl_TableTest]

returns 10,000

Problem is that in the script transformation component

if

(!Row.CopyofDescription_IsNull)

                Output0Buffer.Description = Row.CopyofDescription;

throws error Row.CopyofDescription cannot implicitly convert Blobtype to string.

also tried

  Output0Buffer.Description = Row.CopyofDescription.AddBlobData(

Encoding.Unicode.GetBytes(Row.CopyofDescription);

this also gives error.

In output0BUffer description tried setting to Text stream and also DTWSTR. doesn't work.

kindly advise.


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>