← 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 #240143: Windows does not start after Encryptionizer installed

Type: Information Summary: You have installed Encryptionizer and Windows does not start properly on boot.…

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 #240084: SQL will not start. The System cannot find the file specified

Type Information Summary: SQL Server does not start and the System Event log has an…

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?