Created
February 24, 2018 12:45
-
-
Save amr-swalha/7fea37a554cbdcf6b640205da8d07c56 to your computer and use it in GitHub Desktop.
JSON.Config Stored P
This file contains hidden or 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
| 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