Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Get records from tempDB

(0) ShareShare
ReportReport
Posted on by 15

I want to implement this functionality but vendBalanceProvisionalTmpProcesing is always empty, i know it is empty because it is tempDB :

 while select AccountNum,PostingProfile from vendProvisionalBalanceTmpProcessing
            {
                select sum(AmountCur) from vendTrans
                    where vendTrans.AccountNum == vendProvisionalBalanceTmpProcessing.AccountNum
                    && vendTrans.PostingProfile == vendProvisionalBalanceTmpProcessing.PostingProfile
                    && vendTrans.TransDate >= _fromDate
                    && vendTrans.TransDate <= toDate;
            
                    tempSum += vendTrans.AmountCur;
            
                select sum(AmountMST) from vendTrans
                    where vendTrans.AccountNum == vendProvisionalBalanceTmpProcessing.AccountNum
                    && vendTrans.PostingProfile == vendProvisionalBalanceTmpProcessing.PostingProfile
                    && vendTrans.TransDate >= _fromDate
                    && vendTrans.TransDate <=toDate;
            
                    tempSum+= vendTrans.AmountMST*ledgerParameters.EonExchangeRate;
            
                    tmpValue.Amount = tempSum;
                    tmpValue.AccountNum = vendTrans.AccountNum;
                    tmpValue.PostingProfile = vendTrans.PostingProfile;
                    tmpValue.doInsert();    
            
            }


But there are 2 scenarios where i can access to vendProvisionalBalanceTmpProcessing.AccountNum :

insert_recordset tmpValue
        (AccountNum, PostingProfile, Amount)
        select AccountNum
        from vendProvisionalBalanceTmpProcessing
            group by AccountNum
        join PostingProfile, sum(AmountMST) from vendTrans
            group by PostingProfile
            where vendTrans.AccountNum == vendProvisionalBalanceTmpProcessing.AccountNum
                && vendTrans.PostingProfile == vendProvisionalBalanceTmpProcessing.PostingProfile
                && vendTrans.TransDate < _fromDate;
    update_recordset vendProvisionalBalanceTmpProcessing
        setting OpeningBalance = tmpValue.Amount
        join tmpValue
            where tmpValue.AccountNum == vendProvisionalBalanceTmpProcessing.AccountNum
                && tmpValue.PostingProfile == vendProvisionalBalanceTmpProcessing.PostingProfile;


  • Martin Dráb Profile Picture
    231,748 Most Valuable Professional on at
    RE: Get records from tempDB

    Didn't you meant to ask a question?

    If it's not clear to you, you won't find anything a TempDB table buffer if you didn't insert records to the same buffer, or didn't link it with data from another buffer by linkPhysicalTableInstance().

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,884 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,748 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans