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

Announcements

No record found.

News and Announcements icon
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,310 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.

  • Suggested answer
    DAnny3211 Profile Picture
    11,423 Super User 2026 Season 1 on at

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 748 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 354 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 351 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans