SQL query for AX 2012 to find number sequence Id's which are near to run out


select top 10 (1.00 * HIGHEST - 1.00 * NEXTREC) / (1.00 * HIGHEST - 1.00 * LOWEST), * from numbersequencetable with (nolock) where (1.00 * HIGHEST - 1.00 * NEXTREC) / (1.00 * HIGHEST - 1.00 * LOWEST) < 0.2

SELECT TOP 10 * FROM dbo.LEDGERJOURNALTABLE WITH (NOLOCK) WHERE JOURNALNUM LIKE 'num seq' ORDER BY RECID DESC

Comments

Popular posts from this blog

What is Microsoft Power Platform?

Microsoft.WindowsAzure.Storage.StorageException: The remote name could not be resolved: 'vmname.table.core.windows.net'

AX 2012 Build process using AZURE DEVOPS