Example 1
The original SQL script for the Linked Table
USE [NavisionTEST]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER VIEW [dbo].[Cronus$UC_CustomTableName]
AS
SELECT DeviceId,
(SELECT DATEADD(hour,
(SELECT DATEDIFF(hour, GETDATE(), getutcdate()) AS EXPR1), CustomTableName.ScanTime) AS EXPR1) AS ScanTime, DisplayLine1
FROM [2ndDATABASE].pfo.dbo.metric_CustomTableName AS CustomTableName
WHERE (DisplayLine1 LIKE '%toner%') OR
(DisplayLine1 LIKE '%cartridge%') ;
Example 2
The same SQL script used to define the Linked Table, being modified with the CAST function
USE [NavisionTEST]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER VIEW [dbo].[Cronus$UC_CustomTableName]
AS
SELECT DeviceId,
(SELECT DATEADD(hour,
(SELECT DATEDIFF(hour, GETDATE(), getutcdate()) AS EXPR1), CustomTableName.ScanTime) AS EXPR1) AS ScanTime,
CAST(DisplayLine1 AS NVARCHAR(250)) AS DisplayLine1
FROM 2ndDATABASE.pfo.dbo.metric_CustomTableName AS CustomTableName
WHERE (DisplayLine1 LIKE '%toner%') OR
(DisplayLine1 LIKE '%cartridge%')
Started in 2010, this blog is a technical knowledge-sharing space for Microsoft Navision, Dynamics NAV, and Dynamics 365 Business Central developers. It documents real-world development experiences, practical solutions, and lessons learned from live implementations, covering C/AL, AL extensions, upgrades, integrations, and Business Central SaaS. Maintained by MicroCloud 360, a specialist ERP and cloud consulting company delivering Dynamics 365 Business Central solutions and services globally.
Subscribe to:
Post Comments (Atom)
Business Central SaaS Extension Design: Implementing Plant Tracking with AL Event Subscribers
Extending Business Central SaaS: Plant Tracking Using AL Extensions 1️⃣ Problem Statement In many manufacturing and service-oriented or...
-
Perhaps you may have inquired the possibility of executing an external program within Dynamics NAV due to many reasons such as; 1. To run an...
-
Below is a clear, side-by-side comparison of NAV NAS vs Business Central Job Queue , written in plain language , plus a visual flow diagra...
-
Extending Business Central SaaS: Plant Tracking Using AL Extensions 1️⃣ Problem Statement In many manufacturing and service-oriented or...
No comments:
Post a Comment