12.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> Functions4.1.41 SPACESPACE(num)Returns a string of blank spaces of length num.4.1.42 STRSTR(num,[length[,precision]])Returns a string of length characters. If the integer length is equal to or greater than thenumber of characters in the numeric num (including decimal point and sign characters), STRreturns num converted to a string and padded with leading blanks to make the resulting stringof length characters.If the optional integer precision is specified, num is truncated to the specified number ofdecimal digits before string conversion. If precision is omitted, num is truncated to its integerportion. If precision is larger than the number of decimal digits, num is padded with trailingzeros before string conversion.If length is omitted, it defaults to 10. If length is less than the number of characters in num(after adjustment by precision) a dummy string consisting of all asterisks of length numberof characters is returned.4.1.43 STUFFSTUFF(string,start,length,replace)Returns string with length number of characters removed and the replace string inserted. Thepoint of removal and insertion is specified by the start integer, counting from the beginningof string. If length is 0, no characters are removed. If replace is the empty string, no charactersare inserted.If start is greater than the number of characters in string, no value is returned. If start is 1,length number of characters are removed from the beginning of string and the replace stringinserted. If start is 0, length minus 1 number of characters are removed from the beginningof string and the replace string inserted.If length is greater than or equal to the number of characters in string, the replace string isreturned. The replace string length is not limited by the length of string or length.38 <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!