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



1.new record it will insert but changes of natural key is not present in taget i want to update..

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

Post New Answer

More Data Stage Interview Questions

How to add zero "0" before record in a field?

4 Answers  


i have 4 jobs i want run 1job should run on 1node and 2job runon 2node and.... how to make it possible?

1 Answers  


Explain the ChangeApply stage?

11 Answers  


What are the some differences between 7.x and 8.x version of datastage?

1 Answers  


How do you load dimension data and fact data? Which is first

2 Answers  


why do we need a datawarehouse when we have databases to store data?

1 Answers   L&T,


1)Source file contains one record, I want 100 records in target file.

3 Answers  


what is a message handler

3 Answers   IBM,


How many input links can you give to a Transformer stage?

6 Answers  


How to convert RGB Value to Hexadecimal values in datastage?

1 Answers  


what is the difference between the active datawarehouse and datawarehouse

1 Answers   TCS,


What is ds designer?

1 Answers  


Categories