DT_NTEXT columns in SSIS package and truncation warnings

I have 2 questions:

1) I have a column DT_NTEXT, the value of which I am retrieving from the database and trying to submit to the Test column in Excel. I use the data conversion step between them to convert it to DT_TEXT (text version in Unicode format).

After all, Excel Connection Manager writes ZERO strings (it displays truncation warnings, but runs without errors). I even added a data viewer over the data stream with the following steps:

In the arrows connecting the task“ Source task with data conversion ”and“ Convert data to target task ”, double-click and you will open the data flow path editor. Click“ View data ”, then“ Add ”and click“ OK. ” see you moving on the conveyor. "

I do not see any difference when I run my package.

2) Is it possible to convert the column DT_NTEXT to the column DT_WTSR. In a perfect scenario, I should get this column into the standard nvarchar column in my Excel.

+6
source share
1 answer

Try using LongText DataType. With the Excel surface on the surface of the data stream, attach the source to the destination. Click Create For Excel Sheet Name. Let the system decide the data type and see if this fixes your problem.

This is what I did, helped me come to this conclusion:

  • Create table

    CREATE TABLE [dbo].[ntext] ( [ID] [int] NULL, [NTEXT] [ntext] NULL ) ON [PRIMARY] 
  • Insert multiple entries

     1 asdsadsad 2 qweqerrq 3 But now, looping through the 351 flat-files to load the voter history records for the State cities and towns, the package may process a few files, or up to 20 at a pop, before failing. I've been executing the packages interactively. This is the text from the Output window from the last run: 4 jus/juice, kilogramme/kilogram, lampe/lamp, mére/mother, nuit/night, océan/ocean, pantalon/pants, quintuplé/ 5 مباشر‎ - استمع مباشرة إلى راديو بي بي ...‎ - أخبار الشرق الاوسط‎ - 6 Do not know what it says... just copied from some arabic web page from BBC site 
  • Create a test suite with DFT.

    OleDB Source = created table

    Excel Dest = Create New OLEDB Connection Manager

    Data Access Mode = Table or View

    Excel Sheet Name ... Select New ...

+1
source

Source: https://habr.com/ru/post/927996/


All Articles