17.06.2013 Views

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Appendix A: System Functions<br />

The character_string parameter is a Unicode string. The quote_character parameter is a one-character<br />

string that will be used as a delimiter. The quote_character parameter can be a single quotation mark<br />

(‘), a left or a right bracket ([]), or a double quotation mark (“) — the default is for brackets to be used.<br />

REPLACE<br />

The REPLACE function replaces all instances of second specified string in the first specified string with a<br />

third specified string. The syntax is as follows:<br />

REPLACE(‘’, ‘’, ‘’)<br />

The string_expression1 parameter is the expression in which to search. The string_expression2<br />

parameter is the expression to search for in string_expression1. The string_expression3 parameter<br />

is the expression with which to replace all instances of string_expression2.<br />

REPLICATE<br />

The REPLICATE function repeats a character_expression a specified number of times. The syntax is<br />

as follows:<br />

REPLICATE(, )<br />

REVERSE<br />

The REVERSE function returns the reverse of the specified character_expression. The syntax is as<br />

follows:<br />

RIGHT<br />

REVERSE()<br />

The RIGHT function returns the rightmost part of the specified character_expression, starting a<br />

specified number of characters (given by integer) from the right. The syntax is as follows:<br />

RIGHT(, )<br />

The integer parameter must be a positive whole number.<br />

RTRIM<br />

636<br />

The RTRIM function removes all the trailing blanks from a specified character_expression. The<br />

syntax is as follows:<br />

RTRIM()

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!