Usage Note 30473: PROC SQL's CONSTDATETIME toggle option controls resolution of the DATE(), TIME(), DATETIME() and TODAY() functions prior to query execution
The SQL procedure's toggle option CONSTDATETIME (syntax is CONSTDATETIME | NOCONSTDATETIME) specifies whether the SQL procedure replaces references to the DATE(), TIME(), DATETIME() and TODAY() functions in a query with their equivalent constant values before the query executes. Computing these values once ensures consistency of results when the functions are used multiple times in a query or when the query executes the functions close to a date or time boundary.
When the NOCONSTDATETIME option is set, PROC SQL evaluates these functions in a query
each time it processes an observation.
The option can be specified during a procedure invocation similar to following:
proc sql constdatetime;
In SAS® 9.1.3 Service Pack 4, the CONSTDATETIME | NOCONSTDATETIME option is enabled when you apply hot fixes E9BB70 and E9BB72.
In SAS® 9.2, PROC SQL also contains the global system option SQLCONSTDATETIME, which is also a toggle option (SQLCONSTDATETIME | NOSQLCONSTDATETIME).
The value that is specified for this toggle system option is in effect for all
SQL procedure statements, unless the CONSTDATETIME option in the PROC SQL statement is
set. The value of the CONSTDATETIME option takes precedence over the
SQLCONSTDATETIME system option. However, changing the value of the CONSTDATETIME
option does not change the value of the SQLCONSTDATETIME system option.
If both the CONSTDATETIME option and the REDUCEPUT=
option are specified, PROC SQL replaces the DATE(), TIME(), DATETIME() and TODAY()
functions with their respective values in order to determine the PUT function value
before the query executes.
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.1 TS1M3 SP4 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows XP 64-bit Edition | 9.1 TS1M3 SP4 | |
Microsoft® Windows® for x64 | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Professional | 9.1 TS1M3 SP4 | |
Microsoft Windows NT Workstation | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows XP Professional | 9.1 TS1M3 SP4 | |
Windows Vista | 9.1 TS1M3 SP4 | |
64-bit Enabled AIX | 9.1 TS1M3 SP4 | |
64-bit Enabled HP-UX | 9.1 TS1M3 SP4 | |
64-bit Enabled Solaris | 9.1 TS1M3 SP4 | |
HP-UX IPF | 9.1 TS1M3 SP4 | |
Linux | 9.1 TS1M3 SP4 | |
Linux on Itanium | 9.1 TS1M3 SP4 | |
OpenVMS Alpha | 9.1 TS1M3 SP4 | |
Tru64 UNIX | 9.1 TS1M3 SP4 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
The CONSTDATETIME | NOCONSTDATETIME option specifies whether the SQL procedure replaces references to the DATE(), TIME(), DATETIME() and TODAY() functions with their equivalent constant values before the query executes.
Date Modified: | 2008-05-20 14:33:15 |
Date Created: | 2007-11-05 17:41:01 |