Skip to content

Instantly share code, notes, and snippets.

@amr-swalha
Created February 24, 2018 12:45
Show Gist options
  • Select an option

  • Save amr-swalha/7fea37a554cbdcf6b640205da8d07c56 to your computer and use it in GitHub Desktop.

Select an option

Save amr-swalha/7fea37a554cbdcf6b640205da8d07c56 to your computer and use it in GitHub Desktop.
JSON.Config Stored P
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[JsonConfig_Read_Key]
@key nvarchar(max)
AS
DECLARE @json NVARCHAR(max)
SET @json =
(SELECT [JsonConfig].[Configuration] from JsonConfig
where [Id]=1)
SELECT JSON_VALUE(@json, '$.'+@key) as tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment