Queries on BC AL Helphttps://microsoft.github.io/bcalhelp/navpatterns/1-patterns/queries/Recent content in Queries on BC AL HelpHugo -- gohugo.ioen-usSELECT DISTINCT with Querieshttps://microsoft.github.io/bcalhelp/navpatterns/1-patterns/queries/select-distinct-with-queries/Mon, 01 Jan 0001 00:00:00 +0000https://microsoft.github.io/bcalhelp/navpatterns/1-patterns/queries/select-distinct-with-queries/By Bogdana Botez, at Microsoft Development Center Copenhagen Abstract This pattern explains how to perform SELECT DISTINCT by using queries in Dynamics NAV. Description When working with tables, sometimes a developer needs to perform a SELECT DISTINCT (also known as SELECT UNIQUE) from a table. As NAV does not provide this out of the box, we present below a way to select unique records by using queries. Problem statementuse Queries to Detect Duplicate Recordshttps://microsoft.github.io/bcalhelp/navpatterns/1-patterns/queries/use-queries-to-detect-duplicate-records/Mon, 01 Jan 0001 00:00:00 +0000https://microsoft.github.io/bcalhelp/navpatterns/1-patterns/queries/use-queries-to-detect-duplicate-records/Originally by Abshishek Ghosh and Bogdan Sturzoiu at Microsoft Development Center Copenhagen** ** Abstract This pattern uses queries to create an efficient way to detect duplicate entries in a table. This is, for example, useful when trying to find out which customers or contacts have the same names, so we can merge them later. Description Duplicate detection has several requirements in Microsoft Dynamics NAV. One method to eliminate duplication is by defining the relevant field as the primary key.Use Queries to Replace Nested Loopshttps://microsoft.github.io/bcalhelp/navpatterns/1-patterns/queries/use-queries-to-replace-nested-loops/Mon, 01 Jan 0001 00:00:00 +0000https://microsoft.github.io/bcalhelp/navpatterns/1-patterns/queries/use-queries-to-replace-nested-loops/Originally by Bogdan Sturzoiu, Microsoft Development Center Copenhagen Abstract This pattern shows how the new query object type introduced in NAV 2013 allows you to replace costly loops when inspecting data from two or more tables. Description One of the core operations in a relational database is joining two or more tables. For example, you might need to extract all sales lines in the database together with information regarding the related sales header.