This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE [dbo].[snapshots]( | |
[id] [INT] IDENTITY(1,1) NOT NULL, | |
[status] [NVARCHAR](4) NOT NULL, | |
[islast] [BIT] NOT NULL, | |
[version] [NVARCHAR](500) NULL, | |
[purge_status] [INT] NULL, | |
[period1_mode] [NVARCHAR](100) NULL, | |
[period1_param] [NVARCHAR](100) NULL, | |
[period2_mode] [NVARCHAR](100) NULL, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE [dbo].[snapshots]( | |
[id] [INT] IDENTITY(1,1) NOT NULL, | |
[status] [NVARCHAR](4) NOT NULL, | |
[islast] [BIT] NOT NULL, | |
[version] [NVARCHAR](500) NULL, | |
[purge_status] [INT] NULL, | |
[period1_mode] [NVARCHAR](100) NULL, | |
[period1_param] [NVARCHAR](100) NULL, | |
[period2_mode] [NVARCHAR](100) NULL, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- View the columns where the Masking function is applied | |
SELECT c.name 'ColumnName', tbl.name 'TableName', | |
c.is_masked 'IsMasked', c.masking_function 'MaskingFunction' | |
FROM sys.masked_columns AS c | |
JOIN sys.tables AS tbl | |
ON c.[object_id] = tbl.[object_id] | |
WHERE is_masked = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT [t0].[Titlecode], [t0].[ZLineNumber] | |
FROM [Titles] AS [t0] | |
WHERE [t0].[ListCode] = @p0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE [dbo].[Titles]( | |
[Titlecode] [decimal](13, 0) NOT NULL, | |
[ListCode] [char](3) NULL, | |
[ZLineNumber] [int] NOT NULL, | |
[ZLineRateCode] [char](3) NULL, | |
[ZLineComment] [varchar](30) NULL, | |
CONSTRAINT [pk_Titles] PRIMARY KEY CLUSTERED | |
( | |
[Titlecode] ASC, | |
[ZLineNumber] ASC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Entity Framework Query | |
_context.Titles.Where (t => t.ListCode.Trim() == buildTitle.ListCode) | |
// Corresponding Query fired against SQL Server | |
DECLARE @p0 VarChar(3) = 'BO' | |
SELECT [t0].[Titlecode], [t0].[ZLineNumber] | |
FROM [Titles] AS [t0] | |
WHERE LTRIM(RTRIM([t0].[ListCode])) = @p0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- JSON_MODIFY Demonstration to update the value of a property in JSON string | |
DECLARE @json nvarchar(max) | |
SET @json =N' | |
{ | |
"Person": [ | |
{ | |
"Name": { | |
"FirstName": "Catherine", | |
"LastName": "Abel" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- JSON_QUERY Demonstration to extract an object or array from the JSON data | |
DECLARE @json nvarchar(max) | |
SET @json =N' | |
{ | |
"Person": [ | |
{ | |
"Name": { | |
"FirstName": "Catherine", | |
"LastName": "Abel" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- JSON_VALUE Demonstration to pull one scalar value from the JSON data | |
DECLARE @json nvarchar(max) | |
SET @json =N' | |
{ | |
"Person": [ | |
{ | |
"FirstName": "Gustavo", | |
"LastName": "Harris", | |
"AccountNumber": "AW00029484", | |
"ModifiedDate": "2014-09-12T11:15:07.263" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--ISJSON() - To verify that the text has valid JSON data | |
DECLARE @json nvarchar(max) | |
SET @json =N' | |
{ | |
"Person": [ | |
{ | |
"FirstName": "Gustavo", | |
"LastName": "Achong", | |
"AccountNumber": "AW00029484", | |
"ModifiedDate" "2014-09-12T11:15:07.263" |