← Back to Knowledge Base

KB #240016: SQL Query Results Truncated or Missing When Selecting Encrypted Columns

⏱️ 1 min read
Type: Information
Summary:
The result set from a SELECT statement in Query Analyzer may appear to be truncated or missing (rows and/or columns), if the set includes encrypted columns.
Additional Information:
Encrypted columns contain pure binary data that Query Analyzer is attempting to display as text. It may contain certain print control codes that confuse Query Analyzer when results are displayed in text.The best way to display encrypted data is by converting it to Binary or Varbinary. E.g.,

-- HomePhone is encrypted column
select convert(varbinary(128),HomePhone) from Employees

Alternatively you can sometimes improve the display by making the encrypted column the last one in the Select statement if possible, e.g.,

-- HomePhone is encrypted column
select LastName, FirstName, ... ,  HomePhone from Employees

 

Was this article helpful?

Related Articles

KB #240127: Encrypted Databases Inaccessible After Adding, Removing, or Changing Load Order of Hard Drive

Type: Fixed Summary: After adding, removing or changing load order of hard drives, encrypted databases…

KB #240110: Database owner SID differs from Master

Type: Information Summary: When attempting to encrypt a column using Col-E Column Encryption Manager, or…

KB #240086: fn_n_keycount() returns Zero, when greater than Zero expected.

  Type: Information Summary: You are expecting fn_n_keycount() to return a value > 0, but…

Still need help?

Our support team is here to assist you.

NetLib Security
AI Assistant · Online
Hi! I'm the NetLib Security assistant. I can answer questions about our encryption solutions, HIPAA compliance, Encryptionizer, and more. How can I help you today?