MCTS 70-431 Exam Cram: Implementing and Maintaining Microsoft SQL Server 2005 Exam

Answers B and C are correct. Often, applications fill fields with spaces to the left and/or right to the size of the column. When printing reports and in other cases, these spaces are not desired. LTRIM is used to remove leading spaces, and RTRIM is used to remove training spaces. There is no function that combines them both. The REPLACE function replaces characters in a string. The STR function returns character data converted from numeric.

For more information, see the following sources:

  • Chapter 3, "Implementing Database Objects"

  • SQL Server 2005 Books Online: "SQL Server Language Reference, Transact-SQL Reference, Functions (Transact-SQL), String Functions (Transact-SQL)"

  • "String Functions," http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_fa-fz_7oqb.asp

Категории