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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SOUNDEX<br />

The SOUNDEX function returns a four-character (SOUNDEX) code, which can be used to evaluate the<br />

similarity of two strings. The syntax is as follows:<br />

SPACE<br />

SOUNDEX()<br />

The SPACE function returns a string of repeated spaces, the length of which is indicated by integer. The<br />

syntax is as follows:<br />

STR<br />

SPACE()<br />

The STR function converts numeric data into character data. The syntax is as follows:<br />

STR([, [, ]])<br />

The numeric_expression parameter is a numeric expression with a decimal point. The length parameter<br />

is the total length including decimal point, digits, and spaces. The decimal parameter is the number<br />

of places to the right of the decimal point.<br />

STUFF<br />

The STUFF function deletes a specified length of characters and inserts another set of characters in their<br />

place. The syntax is as follows:<br />

STUFF(, , , )<br />

The expression parameter is the string of characters in which some will be deleted and new ones<br />

added. The start parameter specifies where to begin deletion and insertion of characters. The length<br />

parameter specifies the number of characters to delete. The characters parameter specifies the new set<br />

of characters to be inserted into the expression.<br />

SUBSTRING<br />

The SUBSTRING function returns part of an expression. The syntax is as follows:<br />

SUBSTRING(, , )<br />

Apendix A: System Functions<br />

The expression parameter specifies the data from which the substring will be taken, and can be a character<br />

string, binary string, text, or an expression that includes a table. The start parameter is an integer<br />

that specifies where to begin the substring. The length parameter specifies how long the substring is.<br />

637

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

Saved successfully!

Ooh no, something went wrong!