skip to Main Content

SQL JOB with html report

This is the code that is supposed to return an html report by and ssms job. DECLARE @DataInicialMesAnterior DATE, @DataFinalMesAnterior DATE; SET @DataInicialMesAnterior = DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()) - 1, 0); SET @DataFinalMesAnterior = DATEADD(DAY, -1, DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()),…

VIEW QUESTION

How to get @odata.etag value from JSON in SQL Server table

Does anybody knows how to get @odata.etag value from a JSON into a SQL Server table? Many thanks! JSON string: { "@odata.context": "https://mycompany.com/Tenant/ODataV4/$metadata#Company('mycompany')/ServiceHeader/$entity", "@odata.etag":"W/"JzQ0O0NLZ0lhMkdDdkw3ZU1PbUx6M1M5V1Y4OUtUZUI5OXZOUCtjM2FRZmQ1N0E9MTswMDsn"", "Document_Type": "Order", "No": "1234", "Customer_No": "1234", "Your_Reference": "", "Payment_Terms_Code": "01", "Name": "Company ABC", "Contact_No": "4567", "Status":…

VIEW QUESTION

How can I rewrite this?

Trying to figure out how to convert multiple rows of data to a single row of KeyValue array Setup: using MS SQL SERVER 2017 raw data: Select s.id, s.FkId, s.name ,s.value from tbl s where FkId = 1024180 id |…

VIEW QUESTION
Back To Top
Search