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 />

Text and Image Functions<br />

The text and image functions perform operations on text or image data. They are:<br />

❑ PATINDEX (This was covered in the “String Functions” section earlier in the appendix.)<br />

❑ TEXTPTR<br />

❑ TEXTVALID<br />

TEXTPTR<br />

The TEXTPTR function checks the value of the text pointer that corresponds to a text, ntext, or image<br />

column and returns a varbinary value. The text pointer should be checked to ensure that it points to<br />

the first text page before running READTEXT, WRITETEXT, and UPDATE statements. The syntax is as<br />

follows:<br />

TEXTPTR()<br />

TEXTVALID<br />

648<br />

The TEXTVALID function checks whether a specified text pointer is valid. The syntax is as follows:<br />

TEXTVALID(‘’, )<br />

The table.column parameter specifies the name of the table and column to be used. The text_ptr<br />

parameter specifies the text pointer to be checked.<br />

This function will return 0 if the pointer is invalid and 1 if the pointer is valid.

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

Saved successfully!

Ooh no, something went wrong!