This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 31st, when you will be able to use this site as normal.

    Forum Stats

  • 3,890,899 Users
  • 2,269,649 Discussions
  • 7,916,821 Comments

Discussions

how to find the maximum among records?

3401804
3401804 Member Posts: 3
edited Feb 22, 2017 6:42AM in Data Quality

Hello. I work in Oracle EDQ 11.7.4, the customer has requested such a task. Did not find the maximum search components in this instrument have been decided by a Message Handling Script component.

I wrote in the component Message Handling Script script:

var max = 0;
for (var i = 0; i <records.length; i ++)
{
if (max <records [i] .input1) max = records [i] .input1;

}

for (var i = 0; i <records.length; i ++)
{
 
if (max == records [i] .input1) records [i] .output1 = 'max';
}

where input1 and output1 variables that default to the input and output values for the component. But the problem is that the time for one component processes only one record (records.length always 1) and after processing the record, goes to the second, third and so on and re-executes the code,   i.e. variable max = 0. Those. it turns out, all the records obtained at the output of 'max' which correspond to the input attribute of each record.

I'm sorry, I have bad English, Google Translate

Tagged:

Best Answer

Answers

This discussion has been closed.