Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

decrypt and concatenate strings in select

$
0
0
I want to do this:SELECT (CAST(DecryptByKey(LastName) AS NVARCHAR(200)) AS LastName + ', ' + CAST(DecryptByKey(FirstName) AS NVARCHAR(200)) AS FirstName) AS NameI've tried many variations of this but I usually get the error :The data types varbinary and varchar are incompatible in the add operator. or sometimes - Syntax error near AS.So how do you do this? (SQL Server 2014)Doug

Viewing all articles
Browse latest Browse all 3145

Trending Articles