Hi I have this while select. What I want is to check if JournalNum from NCIntegrationJournalTable exists in NCIntegrationJournalTrans. And if just 1 of the selected records in NCIntegrationJournalTrans has something in its ErrorLog field, then we must not do anything, else if there are nothing in ErrorLog, the journal will be posted.
As it is now, if just 1 of the records has ErrorLog=="", then it will post all of the records as if they are all ok, even if the others has error. And thats not correct.
while select forupdate NCIntegrationJournalTable
exists join ncIntegrationsJournalTrans
where ncIntegrationsJournalTrans.JournalNum == NCIntegrationJournalTable.JournalNum &&
ncIntegrationsJournalTrans.ErrorLog == ""
{
ttsBegin;
NCIntegrationJournalTable.Posted = true;
NCIntegrationJournalTable.update();
ttsCommit;
}
*This post is locked for comments
I have the same question (0)