I want to insert last column of excel in ist column of SQL database,how to insert it?
Thanks in advance
Use the Read Range Workbook activity to get the Excel data in a DataTable format.
Then use the Filter DataTable activity to remove unnecessary columns
Use Insert activity to Insert the new DT into SQL
Hello @Cuberoot
You can read the last range or row of excel file and can insert into Database using run query.
@Cuberoot
You can also use Insert actvity, bulk insert.
My query is I want to insert last column first in sql developer database then 1st column in 2nd column,2nd column in 3rd column,3rd column in 4th column and 4th column in 5th column. How to do it?
Thanks in advance.
This is my input file
I want to upload F column-Plant in A column and so on.
- Read the Excel Sheet and store the variable as a DT
- use for each row Data table
- Use Run query within Loop.
3.1 Connect to database
3.2 Write insert query like
INSERT INTO TABLE_NAME (column1, column2, column3,…columnN)
VALUES ( (‘“+Currentrow(“LastColumnName”)+”’), (‘“+Currentrow(“Column1”)+”’), (‘“+Currentrow(“Column2”)+”’),…(‘“+Currentrow(“ColumnN”)+”’));
Note: You can also pass the variable instead of Currentrow(“ColumnName”)