'Dynamics Nav 14 Reporting Table Linking LEFT OUTER JOIN with CONCAT AND SUBSTR

I am having issues with converting a SQL query into an AL for a report in Dynamics Nav 14 (On-Premises) here is the snippet of the SQL query that I am having issues translating:

LEFT OUTER JOIN dbo.[PGC Code] AS PGCCodeCategory ON CONCAT(SUBSTRING(Items.[PGC Code], 1, 6), '00') = PGCCodeCategory.[Code]

The biggest issues I am having are trying to do the conversion due to the SUBSTR and the CONCAT. I cannot use the DataItemLink: Code=FIELD(PGC Code) since this isn't technically true. How would I go about this? The Items.[PGC Code] is 8 characters.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source