-1

I want to read from a table, change a couple column values for a few lines in a query, then update those lines on the same table.

I'm using SAP BODS, and that's what I tried:

I was about to insert images but just found out I can't insert images until 10 rep.

Anyway, I created a DataFlow where I have the same table as source and target.

A query to filter (using where) and change values (using mapping). And then a Table Comparison (where I expected those lines to be set to update, in this particular case), set table name on first entry, then PK in 'input primary key' and then the two columns I want to change in 'Compare columns'. No other changes from default that I can recall.

Got no warnings on 'validate all', and on execution I receive an

ORA-00001 for the PK

So ... I thought the Table Comparison would try to update, but seems like it's trying to insert instead. I want to know what I'm doing wrong and how could I get the job to do those updates. Thanks in advance.

Ps. I did search SO before asking and didn't find anything relevant.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Max
  • 1
  • 3

1 Answers1

0

Ok
So, turns out I just found what's going on a few minutes after posting the question. Wasn't sure if I should answer my own question and took a look at this Etiquette for answering your own question and decided to come back here and answer my own question.

For some reason I got stuck thinking that it was something to do with the Table Comparison trying to insert a line with a PK that's already there, instead of doing the update I wanted.

But after going back to the job to take another look at the issue, it occurred to me that maybe the problem could be a duplicate in the incoming data set. Made a few adjustment to filter those, and voilĂ .

Max
  • 1
  • 3