Home » excel » SSIS the Percentage column from Excel -> SQL Server

SSIS the Percentage column from Excel -> SQL Server

Posted by: admin April 23, 2020 Leave a comment

Questions:

I am trying to create a SSIS package that will import Excel data to SQL Server 2000 database.

One of the column in Excel sheet is in Percentage format and I wish to import that column in string format so it displays 45.22% instead of 0.4522.

Is there a way of doing this within SSIS?

How to&Answers:

Use derived column to add new column based on expression:

(DT_WSTR,20)(COL1 * 100) + "%"

It multiplies COL1 by 100, converts it to WSTR (unicode string) and adds percent-sign at the end.

<a href="https://exceptionshub.com/category/sql-server”>More Answers>