SQL Server Load percentage value along with percentile from excel file to SQL table using ADF

wwwo4jvm  于 2023-10-15  发布在  其他
关注(0)|答案(1)|浏览(90)

I have few percentage values in a Excel file. Now I want to load the data into a SQL table using Azure Data factory copy activity, While loading the data into a SQL table from Excel file the percentage values are converting into a decimal value during data load.

I have modified the datatype of a column which holds percentage value as varchar, Still it is loading percentage values as decimal values into the percentage columns.

What's the approach should I follow to load percentage values directly in the format of percentage into the SQL table?

I have modified the datatype of a column which holds percentage value as varchar, Still it is loading percentage values as decimal values into the percentage columns.

of1yzvn4

of1yzvn41#

If the type of the column is of Percentage in source excel, then the data will be read as decimal only in ADF. You can correct this either in source excel or after copying the data to SQL table using sql script.

You can use the Script activity, next to copy activity and give the query as,

update <table_name>
set
<column_name>=<column_name>*100

相关问题