P0042 – Direct Query Against The BC Underlying Database
- This topic has 0 replies, 1 voice, and was last updated 11 months, 1 week ago by .
Viewing 0 reply threads
Viewing 0 reply threads
- You must be logged in to reply to this topic.
BIDA Forums › Forums › Technical Topics › 2-Databases › 2-SQL Server › P0042 – Direct Query Against The BC Underlying Database
Tagged: businesscentral, direct query, sqlserver
I put this query on the BC Forums.
https://community.dynamics.com/forums/thread/details/?threadid=1f0d5fdf-68fe-ee11-a1fe-7c1e5219011a
Raul found this.
I know scenarios where cross or outer apply are good to use simply for row by row processing or sometimes performance, but I searched and here are the results that might answer the use of outer apply in those queries instead of left join.
Here are some reasons why OUTER APPLY might be used instead of LEFT JOIN:
OUTER APPLY can be beneficial in scenarios where more complex data retrieval is necessary, such as when dealing with hierarchical data, dynamic columns, or when needing to perform operations unique to each row of the primary table
https://dba.stackexchange.com/questions/75048/outer-apply-vs-left-join-performance
https://www.mssqltips.com/sqlservertip/1958/sql-server-cross-apply-and-outer-apply/
https://www.mssqltips.com/sqlservertip/7491/prepare-sql-statement-spprepare-spexecute/
Best Regards
Peter Jones