Quite often, I get questions about “filters” in AL, enough different questions to warrant an ELI5 video on filters. Check it out if you’re still learning about filters in AL.
Tag Archives: SQL
Business Central Onpremise – Create SQL Missing Indexes from AL
Through the page 9521 Database Missing Indexes it is possible to see the missing indexes suggested by SQL Server for Business Central (in fact, an SQL function is called which returns the missing indexes).
In this case the same function has been recreated on SQL (stored procedure) so that it can be launched both from BC (Onpremise) and from SQL.
Dynamics 365 Business Central: Get the amount of SQL rows read and the amount of SQL statements executed on the session via AL – SessionInformation Data Type
Today I want to share a mini tip about Business Central. How to get the amount of SQL rows read and the amount of SQL statements executed on the session via AL.
As you might, As of Business Central April 2019, the AL debugger also offers the capability to examine your AL code’s effect on the Business Central database.
SQL – Search for special characters
Sometimes it may happen that by importing data from external sources (even with Web Services), some special characters are written and then uploaded to NAV \ Business Central.
These characters (even if accepted) could then give problems to searches, XML exports, blocking the sending of documents.
Use a Query Object if you have an urge for SQL in Business Central
The Query Object is often overlooked in Business Central, but it does give SQL’ish access to creating queries, check it out:
Export SQL data to CSV or XML File via Powershell
Sometimes it may be useful or necessary to use powershell to read data from SQL Server to export it to other formats This can also be used with older versions of Dynamics NAV which do not have access to the integrated powershell. Using standard powershell commands it is possible for example to read an SQL view and export it to CSV or XML file.
AL is not SQL (and Business Central is not a “SQL Application”)
Recently I have had several conversations about SQL vs AL. Lots of new talent is coming into the channel, often with SQL knowledge, but how to apply that in an AL-driven world? In this video, I discuss AL vs SQL: