Created
July 26, 2012 08:33
-
-
Save mattiaswolff/3180994 to your computer and use it in GitHub Desktop.
Mediusflow: Re-send integration postings (Final postings / paymenttransferred = 6)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE NAV_IN_MESSAGE_TAB_TRANS | |
SET ROWSTATE = 'Posted' | |
WHERE message_id IN | |
(SELECT message_id | |
FROM nav_in_message_tab_trans nimtt | |
INNER JOIN ERRAND e ON (e.ID = nimtt.ERRAND_ID) | |
INNER JOIN INVOICE_HEAD ih ON (e.INVOICEID = ih.ID) | |
WHERE ih.PaymentTransferred = 6 | |
AND e.VISIBLE = 0 | |
AND nimtt.MESSAGE_ID IN | |
(SELECT top 1 nimtt1.MESSAGE_ID | |
FROM NAV_IN_MESSAGE_TAB_TRANS nimtt1 | |
INNER JOIN NAV_IN_MESSAGE_LINE_TAB_TRANS nimltt1 ON (nimtt1.MESSAGE_ID = nimltt1.MESSAGE_ID) | |
WHERE ERRAND_ID = e.id | |
AND nimltt1.c56 = 'Finally' | |
ORDER BY nimtt.MESSAGE_ID DESC)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment