Import excel
sheet data into SQLServer table using SSIS.
1) For creating excel connection
Drag and drop the excel connection from dataflow
2) Double Click on Excel Source
3) Click on new Connection
4) Browse Path of excel need to upload
5) Select name of excel sheet
6) Click on Preview
7) Select Ignore failure and click on apply if need to skip the
conversion errors. Click on ok
9) Drag and drop data conversion
10) Connect using precedence constraints
11) Double Click and select available input columns
12) Convert the Data type.
General Conversion: Excelà Database
Int ààà
Four byte Signed integer [DT-I4]
Bigint ààà
Eight byte Signed integer [DT-I8]
Varcharààà String [DT-STR]
BIT ààà Boolean [DT-Boolean]
DATE àààDatabase date [DT_DBDATE]
13) drag and drop the SQLServer destination
14) Connect Data conversion with sqlserver destination using precedence constraints.
Double click and click on new
15) Click on new and select the
appropriate server and database (to where you want to upload the excel data
into sqlserver).
16) Click on OK. Select the table where you want to upload the excel
data.
17) Select mapping and select
conversion columns
18) Click on OK .If there is any conversions error is there it will show
in red mark.
19) Please verify and select appropriate conversions
20) If there is any warning rectify using data conversions.
21) Execute the package
22) If there any errors verify the errors. Suppose in my case client_id
is contain null value
23) Change the query in connection manager .ensure
that key columns cannot contain null values
24) Modify and save the package and execute.
25) Finally verify the data in database
No comments:
Post a Comment