Question 7

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,"

MCTS 70-431(c) Implementing and Maintaining Microsoft SQL Server 2005
MCTS 70-431 Exam Cram: Implementing and Maintaining Microsoft SQL Server 2005 Exam
ISBN: 0789735881
EAN: 2147483647
Year: 2006
Pages: 200
Authors: Thomas Moore © 2008-2017.
If you may any questions please contact us: