Text function

xiaoxiao2021-03-06  76

Text function

Text internal functions are operated with TEXT and Image data. The name, variable, and results of the Text function are listed below:

The function name parameter returns the result of Patindex ("% Pattern%", char_expr [use {bytes | chars | characters}]) Returns a constant number, which represents Pattern first position in the specified character expression. Returns 0 if Pattern is found. By default, returns the offset calculated by characters; for multi-byte strings, Using Bytes must be specified in order to return offsets in bytes. Wildcard must be placed in front and behind, except for the start character and end characters. TEXTPTR (Text_Columname) Returns a 16-byte binary value of a Text pointer. Detect the TEXT pointer value to ensure that the pointer points to the first text page TextValid ("Table_name, Col_name", TextPointer) Detects a given pointer to be valid. Note that the identifier of the Text or Image column must include a table name. If the pointer is valid, then return 1, otherwise return 0 set textsize {n | 0} set textsize command Specifies the maximum number of bytes returned by the SELECT statement, and the current setting is stored in the global variable @@ textize. n is a positive integer that specifies the maximum number of bytes returned to the data; 0 To restore the default setting (32K bytes), DataLenth (system function) can also be used on the Text column. The T-SQL supports the convert command Explicitly converts Text to VARCHAR or CHAR, or converts Image to Varbinary or Binary, but the data of Text or Image is intercept 255 bytes.

转载请注明原文地址:https://www.9cbs.com/read-120458.html

New Post(0)