Error

DB_QUERY_FAILED Changed database context to 'Digigraphie'.

DECLARE @PassphraseEnteredByUser nvarchar(128);
	SET @PassphraseEnteredByUser 
    = 'I paint therefore 1 am';
	
	DECLARE @SortBy nvarchar(255);
	
	SELECT OwnerId, 
	
	(DecryptByPassphrase(@PassphraseEnteredByUser, OWN.OwnerName_enc, 1, CONVERT (varbinary, OwnerId) )) AS OwnerName,
	(DecryptByPassphrase(@PassphraseEnteredByUser, OWN.Surname_enc, 1, CONVERT (varbinary, OwnerId) )) AS Surname,
	(DecryptByPassphrase(@PassphraseEnteredByUser, OWN.PsuedoName, 1, CONVERT (varbinary, OwnerId) )) AS PsuedoName, OWN.NationalityId
	
	FROM Owner OWN
	
	LEFT JOIN UserProfile USRP
	ON USRP.UserId = OWN.UserId
	
	WHERE OWN.IsDeleted != '1' 
	
	AND
		(
			UPPER(LEFT((DecryptByPassphrase(@PassphraseEnteredByUser, OWN.PsuedoName, 1, CONVERT (varbinary, OwnerId) )),1)) = 'V'
			OR
				(
					LTRIM(RTRIM((DecryptByPassphrase(@PassphraseEnteredByUser, OWN.PsuedoName, 1, CONVERT (varbinary, OwnerId) )))) = NULL AND 
					UPPER(LEFT((DecryptByPassphrase(@PassphraseEnteredByUser, OWN.Surname_enc, 1, CONVERT (varbinary, OwnerId) )),1)) = 'V'
				)
		)
	
	
	AND 
		USRP.UserStatusId != 5 
	ORDER BY (DecryptByPassphrase(@PassphraseEnteredByUser, OWN.Surname_enc, 1, CONVERT (varbinary, OwnerId) )) ASC