Error in Before Sub routine
Posted: Mon Dec 17, 2007 7:52 pm
Hi,
I am having a problem doing a delete in the before sub routine.
The source is a sequential file and the target is a DB2 stage. The job does an insert/update depending on the source.
Table A
A1 B1
A1 is the primary key of Table A
B1 is a foreign key.
When I try to update Table A for eg with contents A1 and B2. I have an error like "The parent key in a parent row of relationship <Constraint> cannot be updated".
To avoid this error in the Before subrouting of the Target DB2 stage I am trying to do delete the record with B1 from the Table B but I get an error message saying wrong number of parameters.
Is it possible to do this deletion without using a lookup ???
I am having a problem doing a delete in the before sub routine.
The source is a sequential file and the target is a DB2 stage. The job does an insert/update depending on the source.
Table A
A1 B1
A1 is the primary key of Table A
B1 is a foreign key.
When I try to update Table A for eg with contents A1 and B2. I have an error like "The parent key in a parent row of relationship <Constraint> cannot be updated".
To avoid this error in the Before subrouting of the Target DB2 stage I am trying to do delete the record with B1 from the Table B but I get an error message saying wrong number of parameters.
Is it possible to do this deletion without using a lookup ???