Enhancements to the SQL Date/ Time Scalar Functions
Original Publication Date: 1991-Sep-01
Included in the Prior Art Database: 2005-Apr-03
Publishing Venue
IBM
Related People
Boykin, JR: AUTHOR [+4]
Abstract
BACKGROUND An SQL scalar function is a function that produces a value from one or more scalar arguments and is expressed in a functional form. The SQL date/time scalars are new functions which will be added to the OS/2* Database Manager ES 1.0.
Enhancements to the SQL Date/ Time Scalar Functions
BACKGROUND
An SQL scalar function is a function that produces a value from one
or more scalar arguments and is expressed in a functional form. The
SQL date/time scalars are new functions which will be added to the
OS/2* Database Manager ES 1.0.
The family of
IBM Relational Database Products which support
the datetime scalar function accepts the following as input values to
each of the corresponding scalar functions:
THE INVENTION
As an
extension to the above, the OS/2 Database Manager will
extend the set of valid input arguments for each of the datetime
scalar functions. The extensions and the supporting scalar functions
are described below.
All scalar
functions which accept a timestamp argument will now
accept a character representation of a timestamp as an argument. This
enhances the following scalar functions DATE, DAYS, DAY, HOUR,
MINUTE, MONTH, TIME, MICROSECOND, SECOND AND YEAR.
A character representation of a
timestamp may come from a host
variable, a string literal, a column, or any other character string
expression. The character representation
of a timestamp is an ASCII
character string that starts with digit, has a length of at least 16
characters and represents a valid timestamp in the following format:
yyyy-mm-dd-hh.nn.ss<.iiiiii>
where yyyy is the year, mm is the
month, dd is the day, hh is
the hour, nn is the minute, ss is the second, and iiiiii is the
microsecond.
All scalar
functions which accept a date argument will now
accept a character representation of a date as an argument. This
enhances the following scalar functions: DAY, MONTH, and YEAR.
A character representation of a date
may come from a host
variable, a string literal, a column, or any other character string
expres sion. The character
representation of a date is an ASCII
character string that starts with digit, has a length of at least 8
char acters, and represents a valid
date in one of the following
formats:
mm/dd/yyyy USA: IBM standard for the U.S. form
dd.mm.yyyy EUR: IBM standard for the European form
yyyy-mm-dd ISO: International Standards Organization
...