A.11. Text and Image Functions
The text and image functions perform operations on text or image data. They are:
PATINDEX (This was covered in the "String Functions" section earlier in the appendix.)
TEXTPTR
TEXTVALID
A.11.1. TEXTPTR
The TEXTPTR function checks the value of the text pointer that corresponds to a text, ntext, or image column and returns a varbinary value. The text pointer should be checked to ensure that it points to the first text page before running READTEXT, WRITETEXT, and UPDATE statements. The syntax is as follows:
TEXTPTR(<column>)
A.11.2. TEXTVALID
The TEXTVALID function checks whether a specified text pointer is valid. The syntax is as follows:
TEXTVALID('<table.column>', <text_ptr>)
The table.column parameter specifies the name of the table and column to be used. The text_ptr parameter specifies the text pointer to be checked.
This function will return 0 if the pointer is invalid and 1 if the pointer is valid.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access