1
我想驗證存儲在變量中的字符串是否是有效的BASE64字符串,或者不在我的存儲過程中。驗證SQL Server中的BASE64字符串
例如:
declare @source varbinary(max), @encoded varchar(max), @decoded varbinary(max)
set @source = convert(varbinary(max), 'Hello Base64')
set @encoded = cast('' as xml).value('xs:base64Binary(sql:variable(''@source''))', 'varchar(max)')
現在我想驗證@encoded是否具有有效BASE64字符串或沒有。
任何答案將不勝感激。
感謝
這也適用於我。謝謝 –