MSSQL-Base64-String-EncodeDecode-Function1 MSSQL Base64 String Encode,Decode Function CREATE FUNCTION [dbo].[Base64EncodeByBin] ( @PlainText VarChar(MAX) ) RETURNS VarChar(MAX) BEGIN DECLARE @ENCODED VARCHAR(MAX) SELECT @ENCODED = CAST(N'' AS XML).value('xs:base64Binary(xs:hexBinary(sql:column("bin")))','VARCHAR(MAX)') FROM ( SELECT CAST(@PlainText AS VarBinary(MAX)) AS bin ) AS bin_sql_server_temp; RETURN @ENCODED END -------------------------------------------------------------.. 2016. 5. 13. 이전 1 다음