← 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 #240052: Torn Page (Error 823) error at offset 0 when opening encrypted database

Type: Information Summary: A Torn Page error at offset 0x0000000000000000 will occur when trying to…

KB #240111: Encryptionizer for SQL FIPS 140-2 Release Notes for FIPS 801.1 upgrades

Type: Tip Summary: Below are the enhancements and fixes available in Encryptionizer for SQL FIPS…

KB #240107: SQL Maintenance Plans do not delete encrypted database backup or transaction log backup files

Type: Fixed Summary: You have Configured/Secured your SQL Server instance with these options: Secured with…

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?