| Solution |
| 1. | Create new task |
Click on New->Task Editor. |
| 2. | Connect to the source database |
Using the Database command from the Application category specify a
connection string to connect to the source Database Screenshot 1.
Connect to '<database connection string>. |
| 3. | Specify a SQL Query to get the data from the database |
Using the Database command from the Application category and selecting SQL Query Option specify a SQL Query
Execute SQL Statement: Select * From OrderMaster |
| 4. | Connect to the target database |
Insert Database command to connect to the target database where you want to transfer data. |
| 5. | Transfer the data |
Using the Loop command and selecting "Each row in a SQL Query Dataset"
option, you can Loop through each row of the result returned by the query
Inside the Loop Block, specify Insert query to insert records in destination database.
Screenshot 2
Note: To access values of different columns in the dataset use the index 1,2,3 etc with the System Variable $Dataset Column$. |
| |
| When you run this task, it connects to the source database , retrieves the data
and fill dataset with data fetched from database. With insert query in loop it will add all the records to destination table in database. |