IsBase64
Checks whether a string is Base64 encoded.
- Free Function
- SQL Server Compatibility: 2008, 2012, 2014, 2016, 2017
SELECT SQLHTTP.net.IsBase64 ( @Text )
Name | Type | Description |
---|---|---|
@Text | nvarchar(MAX) | String to be checked. |
bit
0 = Text is NOT Base64 encoded
1 = Text IS Base64 encoded
1 2 3 4 5 6 |
DECLARE @Text nvarchar(MAX) SET @Text = 'VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw==' SELECT SQLHTTP.net.IsBase64(@Text) |
1 2 3 4 5 |
----- 1 |