← Back to Knowledge Base

KB #240029: How to specify column and table names containing embedded spaces

⏱️ 1 min read
Type: Tip
Summary:
Column and table names containing embedded spaces (blanks) must be enclosed in [brackets], not ‘quotes’, when passed as parameters to APIs.
Additional Information:
-- Correct:
set @value = fn_n_decrypt_char([home phone], 0, 0, 1)

-- Wrong: this will decrypt the literal value "home phone"
set @value = fn_n_decrypt_char('home phone', 0, 0, 1)

-- Correct:
exec sp_n_encrypt_col [student table], [home phone], 1

-- Wrong: this will generate an error
exec sp_n_encrypt_col 'student table', 'home phone', 1

Tip: It is always ok to enclose table or column names in [brackets] even if they do not contain embedded spaces:

-- Both are correct:
exec sp_n_encrypt_col students, telephone, 1
exec sp_n_encrypt_col [students], [telephone], 1

 

Was this article helpful?

Related Articles

KB #240008: How to access encrypted databases on a RAW Volume

Type: Information Summary: This article explains how to allow SQL Server to access encrypted databases…

KB #240060: Upgrading from an evaluation version to production version of Encryptionizer

Type: Info Summary: You have purchased a production license of Encryptionzier and would like to…

KB #240118: Encrypting FileStreams (Whole Database Encryption)

Type: Information Summary: Instructions on how to configure Encryptionizer to work with SQL Server FileStreams.…

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?