Caché Transact-SQL (TSQL) Migration Guide - InterSystems ...
Caché Transact-SQL (TSQL) Migration Guide - InterSystems ...
Caché Transact-SQL (TSQL) Migration Guide - InterSystems ...
- No tags were found...
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.25 DAYDAY(date)Returns the day portion of the specified date or date/time string. The date can be specified in ODBC timestamp format:yyyy-mm-dd hh:mm:ss.nThe date must contain a date component. The date separator must be a hyphen (-).The date can also be specified in <strong>Caché</strong> $HOROLOG date format, such as 60703 (March 14, 2007).6.1.26 DB_NAMEDB_NAME()Returns the current namespace name. No argument is permitted.6.1.27 EXECEXEC(@var)Executes dynamic <strong>SQL</strong> at runtime, as shown in the following example:DECLARE @dyncode VARCHAR(200)SELECT @dyncode='SELECT TOP 4 Name,Age FROM Sample.Person'EXEC(@dyncode)Compare this dynamic execution with the EXECUTE command that executes a stored procedure.6.1.28 EXPEXP(num)Returns the exponential of num. This is the e constant (2.71828182) raised to the power of num. Thus EXP(2) returns7.3890560989.6.1.29 FLOORFLOOR(num)Returns the closest integer less than or equal to num. Thus 123.99 returns 123, –123.99 returns –124.6.1.30 GETDATEGETDATE()Returns the current local date and time in the following format:yyyy-mm-dd hh:mm:ss.nTime is specified using a 24-hour clock, Fractional seconds are returned.40 <strong>Caché</strong> <strong>Transact</strong>-<strong>SQL</strong> (T<strong>SQL</strong>) <strong>Migration</strong> <strong>Guide</strong>