As mentioned in the Merge Statement Configuration section, this Merge Statement option helps in updating or inserting rows in target table with rows selected from one or more source tables.
To merge a statement with the MSSQLserver, perform the following actions:
- Select Merge Statement option in SQL configuration
- In the Merge Query Builder panel,
- provide a name for the query in the Query Name text box.
- Under the Select source and target tables section, click the Add button under the Select Target Table subsection.
In the Table Selection Dialog panel that pops up, click the Fetch Schemas button and select the table after clicking the Refresh Tables button. Click OK after choosing the table.
Under the Select source and target tables section, click the Select Query Wizard button under the Select Source Table subsection (see the figure in Step 2).
Select the source table for the merge query and choose the columns to be merged.Select or clear the target table column fields based on the preference of building the query.
The Pre-condition section gets auto populated based on the selected target table fields.
Provide a value in the Column Value cell which in this case is the following:
Now expand the Post-condition section and perform the following actions and click OK to save the changes:
- Enter the corresponding column value of column name as
alias."name"
. Add values in the Insert values using map or Insert values using SELECT Query.
The Merge SQL query appears under the SQL statement.
- Enter the corresponding column value of column name as