web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

Can we use Temporary table in query?

(0) ShareShare
ReportReport
Posted on by 2,300 Moderator

So, I have created a query and used it in a temporary table to view the filtered record, but then I want to use that temporary table in my other query to use it as a data Item.

pastedimage1666339432513v2.png

That uerAllocateInvoiceListView is a temporary table and data is inserted in that table whenever I open the page.

When I'm using that table in the query I get the error. "A query cannot process data from more than one database (data source). This includes queries for data in the both application database and the business database, even if the current deployment is not multitenant."

pastedimage1666339591998v3.png

Is there any other way to solve my problem?

The requirement is to use filtered query records and use it in another query to filter more records from tables.

I have the same question (0)
  • Suggested answer
    DAnny3211 Profile Picture
    11,382 on at
    RE: Can we use Temporary table in query?

    Hi

    temporary tables can only be used in Reports, XmlPort or in the codeunit

    learn.microsoft.com/.../devenv-temporary-tables

    Greetings

    DAniele

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 3,750

#2
Sumit Singh Profile Picture

Sumit Singh 2,689

#3
YUN ZHU Profile Picture

YUN ZHU 1,987 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans