Page 1 of 1

writing data into two different tables

Posted: Wed May 31, 2006 8:00 am
by adams06
I have two tables

1st one is main source, i have a field x in that.
2nd one is a look up , i have a field y in that.

Both the datatype and length are equal.

my 1st problem is, if the record exist in x, and if the same record exist in y then i need to write to write to a flat file .how to implement this condition.

my 2nd problem is, if the record exist in x, and does not record exist in y ,then i need to write in another flat file, how to implement this condition.


thanks in advance

Posted: Wed May 31, 2006 8:09 am
by kris007
Ok..You have a mainsource..then a Transformer and a reference input(hashed file). Now as per your design you will have two outputs from your Transfomer to two flat files. In the Constraints section of the Transformer, go to LinkVariables, Input NOTFOUND and set it such that..

Input.NOTFOUND<>@TRUE for your first problem and
Input.NOTFOUND=@TRUE for your second problem.

And ofcourse, I am assuming you are having a common key between your main source and the hashed file.

IHTH

Kris.