1.new record it will insert but changes of natural key
is not present in taget i want
to update (here key is composite natural key )can any one
help this to explan how to do
Answer / Satish Chandra Singh
In Data Stage, if you need to update a record with a composite natural key that does not exist in the target, you can use the UPDATE_MATCH statement. This allows you to match on multiple columns and perform updates even when the natural key is not present exactly as it was previously. Here's an example:
Assuming your source dataset has a composite natural key (Column1, Column2) and target dataset has the same structure.
```sql
UPDATE_MATCH TargetDataset
SET
Column1 = SourceDataset.Column1,
Column2 = SourceDataset.Column2,
OtherColumns = SourceDataset.OtherColumns
FROM SourceDataset
WHERE Column1 = TargetDataset.Column1 AND Column2 = TargetDataset.Column2;
```
This statement will match records based on the composite natural key and update them if they exist in the target dataset.
| Is This Answer Correct ? | 0 Yes | 0 No |
How to add zero "0" before record in a field?
i have 4 jobs i want run 1job should run on 1node and 2job runon 2node and.... how to make it possible?
Explain the ChangeApply stage?
What are the some differences between 7.x and 8.x version of datastage?
How do you load dimension data and fact data? Which is first
why do we need a datawarehouse when we have databases to store data?
1)Source file contains one record, I want 100 records in target file.
what is a message handler
How many input links can you give to a Transformer stage?
How to convert RGB Value to Hexadecimal values in datastage?
what is the difference between the active datawarehouse and datawarehouse
What is ds designer?