13.07.2015 Views

Caché Transact-SQL (TSQL) Migration Guide - InterSystems ...

Caché Transact-SQL (TSQL) Migration Guide - InterSystems ...

Caché Transact-SQL (TSQL) Migration Guide - InterSystems ...

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.

T<strong>SQL</strong> Functions6.1.50 PATINDEXPATINDEX(pattern,string)Returns an integer specifying the beginning position of the first occurrence of pattern in string, counting from 1. If patternis not found in string, 0 is returned. Specify pattern as a quoted string. Comparisons are case sensitive. The pattern cancontain the following wildcard characters:%_[xyz][a-z]Zero or more characters. For example, '%a%' returnsthe position of the first occurrence of 'a' in string,including 'a' as the first character in string.Any single character. For example, '_l%' returns 1 ifstring begins with a substring such as 'Al', 'el', and 'il'.Any single character from the specified list ofcharacters. For example, '[ai]l%' returns 1 if stringbegins with the substring 'al' or 'il', but not 'el' or 'Al'.Any single character from the specified range ofcharacters. For example, '%s[a-z]t%' matches 'sat','set', and 'sit'. A range must be specified in ascendingASCII sequence.The caret (^) character is a not a wildcard character; if included within square brackets it is treated as a literal. A patterncommonly consists of a search string enclosed in percent (%) characters '%Chicago%' indicating that the entire stringshould be searched.6.1.51 PIPI()Returns the constant pi. The parentheses are required; no argument is permitted. Thus PI() returns 3.141592653589793238.6.1.52 POWERPOWER(num,exponent)Returns the value num raised to exponent.6.1.53 QUOTENAMEQUOTENAME(value)Returns value as a delimited identifier. T<strong>SQL</strong> only supports double quotes ("value") as delimiter characters.46 <strong>Caché</strong> <strong>Transact</strong>-<strong>SQL</strong> (T<strong>SQL</strong>) <strong>Migration</strong> <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!