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
-- code to test number check | |
select dbo.check_my_number('10') as test1 | |
,dbo.check_my_number('boo') as test2 | |
,dbo.check_my_number('10.1') as test3 | |
,dbo.check_my_number('-10') as test4 | |
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
-- simple function to wrap try_parse | |
create FUNCTION dbo.check_my_number (@value varchar(255)) | |
RETURNS bigint | |
as | |
BEGIN | |
declare @rt bigint; | |
set @rt = try_parse(@value as bigint) | |
return @rt; |
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
exec sp_updateextendedproperty @name=N'sys_sensitivity_label_name', | |
@level0type=N'schema',@level0name=N'Sales',@level1type=N'table', | |
@level1name=N'CustomerTransactions',@level2type=N'column', | |
@level2name=N'AmountExcludingTax',@value=N'Custom Confidential' |
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
exec sp_updateextendedproperty @name=N'sys_sensitivity_label_name', @level0type=N'schema', @level0name=N'Sales', | |
@level1type=N'table', @level1name=N'CustomerTransactions', @level2type=N'column', | |
@level2name=N'AmountExcludingTax',@value=N'Confidential' |
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
DECLARE @Dictionary TABLE | |
( | |
pattern NVARCHAR(128), | |
info_type NVARCHAR(128), | |
sensitivity_label NVARCHAR(128), | |
can_be_numeric BIT | |
) | |
INSERT INTO @Dictionary (pattern, info_type, sensitivity_label, can_be_numeric) | |
VALUES | |
('%username%' ,'Credentials' , 'Confidential' ,1), |
NewerOlder