As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
Data Migrator Assistance needed when using function Lookup_MFD.
Statement: (SELECT MAX(SQ.ENTRY_NUM) FROM TARGET_TABLE SQ WHERE SQ.INPUT_ID = SOURCE.ID AND SQ.TYPE_ID = SOURCE.TYPE_ID)
ENTRY_NUM = ENTRY_NUM + 1
Does the Lookup_MFD build the result set 1 time initally, or it it executed for each source record?
What I'm seeing is the function works fine for the first record in the group, but not for subsequent records in the same group. The inital value for the group is retuned for each record, causing duplicate key violation.
The select is passed through to the underlying relational database which optimizes the sub-select.
I'm sorry the only way I've been able to come up with to address this is to run the flow iteratively, once for each input row. If your source is an RDBMS table that means generating the row number:
SELECT
T2.ID ,
T2.TYPE_ID ,
T2.MAX_ENTRY
FROM
(SELECT
T1.ID ,
T1.TYPE_ID ,
1 + (SELECT MAX(SQ.ENTRY_NUM ) FROM
TARGET SQ WHERE SQ.TYPE_ID = T1.TYPE_ID AND
SQ.INPUT_ID = T1.ID ) AS MAX_ENTRY ,
DB_EXPR(ROW_NUMBER() OVER (ORDER BY ID,TYPE_ID) ) AS ROWN
FROM
sourcet T1
) T2
WHERE
T2.ROWN = &NUM
Then you could use the Iterator to run once for each row number, 1 through 4, supplying values for &NUM.
N/A
Posts: 397 | Location: New York City | Registered: May 03, 2007
If this isn't possible. Is it possible to use function LAST or something, to say if the current value of a field is different from the value of the field from the previous record reset counter.