ODBC Server Reference Manual
Transact-SQL Language
HP NonStop ODBC Server Reference Manual—429151-002
4-21
Functions
Generating Dates Earlier Than 1753
Transact-SQL and NonStop SQL/MP allow different year ranges:
Although the NonStop ODBC Server allows you to specify dates only in the range
allowed by Transact-SQL, you can obtain dates earlier than 1753 by using negative
numeric literals in a datetime function.
For example, the following statement produces a 1752 date when executed using the
NonStop ODBC Server:
select dateadd (day, -1, 'jan 1 1753')
--------------------
Dec 30 1752 12:00AM
(1 row affected)
This statement would cause an overflow error message if executed in Transact-SQL.
Limitations on Specifying Milliseconds
Transact-SQL and NonStop SQL/MP allow different millisecond ranges:
The NonStop ODBC Server allows you to specify milliseconds only in the range
allowed by NonStop SQL/MP. For example, the following statement is valid in
Transact-SQL but generates an error when executed through the NonStop ODBC
Server:
select dateadd (millisecond, 9999, 'jan 2 1994')
Msg 18001, Level 15, State 1:
NonStop SQL message (3096) : INTERVAL value is out of range.
The following statement, however, specifies a valid NonStop SQL/MP millisecond
range and can be executed through the NonStop ODBC Server:
select dateadd (millisecond, 999, 'jan 2 1994')
--------------------
Jan 2 1994 12:00AM
(1 row affected)
Transact-SQL 1753-9999
NonStop SQL/MP 0001-9999
Transact-SQL Up to 3 digits
NonStop SQL/MP Up to 6 digits