3

I´m reading .csv file to paste into sql table but I get advertesiment into a column

enter image description here

It occurse because my destination table have "MOLDE" with string(50) and source have string(255)

How can I change "MOLDE" length to get only 50 first values

So I create derived column and I try to use substring, but it keep getting length 255 enter image description here

What can I do there?. Regards

----UPDATE----

I´m resolve it as answer comment but I still getting Advertisiment Icon like this: enter image description here

Is it posible to remove it?

2
  • How about LEFT(MOLDE,50) ? Commented May 10, 2017 at 22:46
  • Yes it works, but cann you view my update in my question please? @bjones Commented May 10, 2017 at 22:52

2 Answers 2

2

Try casting to DT_STR with length equal 50

(DT_STR,50,1252)SUBSTRING(MOLDE,1,50)

OR

(DT_STR,50,1252)LEFT(MOLDE,50)

Note that you have to map the derived column to the destination instead of the original column , if warning still appearing just double click on the destination to refresh metadata

Reference

UPDATE 1

After reading your comment i think the warning still appearing because you have selected derived column option to replace the original column which caused this conflict, just change the option Replace 'MOLDE' to Add New Column and map the derived column to the destination column.

Or make sure that the destination is reading MOLDE column from the derived column component not the Source column, openning Destination with advanced editor may help.

Sign up to request clarification or add additional context in comments.

5 Comments

I do it, and I double click on the destinaion but I still getting warning
What is the warning message. Handover the mouse on the warning mark to see it
may be it is another one
I check it and is the same warning as I post
Check that you have used the derived column not the source.
1

Right click your warning icon, chose Show Advanced Editor, input and output properties tab, check your column length there.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.