Saturday, February 20, 2010

Remove spaces

Your SQL Server database contains a lot of columns with data type nchar. Many of them contain preceding or trailing spaces. You need to implement mechanism to get the data without leading and trailing spaces. Your solution must be available for reuse in T-SQL statements and views. What should you do?

A. Create DML triggers that query the inserted and deleted tables
B. Create a stored procedure that calls LTRIM and RTRIM built-in function
C. Call TRIM built-in function
D. Create a function that calls RTRIM and LTRIM built-in function

Answer:[D]
Highlight to find out the answer.

No comments:

Post a Comment