Hi IAN
The EXTEND function adjusts the precision of a DATETIME or DATE value.
The expression cannot be a quoted string representation of a DATE
value.
If you do not specify first and last qualifiers, the default
qualifiers are YEAR TO FRACTION(3).
If the expression contains fields that are not specified by the
qualifiers, the unwanted fields are discarded.
If the first qualifier specifies a larger (that is, more significant)
field than what exists in the expression, the new fields are filled in
with values returned by the CURRENT function. If the last qualifier
specifies a smaller field (that is, less significant) than what exists
in the expression, the new fields are filled in with constant values.
A missing MONTH or DAY field is filled in with 1, and the missing HOUR
to FRACTION fields are filled in with 0
and below is the code I have.
CREATE FUNCTION "INFX "."EXTEND" ( DATE TIMESTAMP, UPPER1
INTEGER, LOWER1 INTEGER, UPPER2 INTEGER,LOWER2 INTEGER)
RETURNS TIMESTAMP
SPECIFIC SQL050909191710600
EXTERNAL NAME 'com.ibm.db2.tools.mtk.mtkinfxudf.infxUDFs! extend()'
LANGUAGE JAVA
PARAMETER STYLE JAVA
NOT VARIANT
FENCED THREADSAFE
NOT NULL CALL
NO SQL
NO EXTERNAL ACTION
NO SCRATCHPAD
NO FINAL CALL
ALLOW PARALLEL
NO DBINFO;
thanks
Rick
On Mar 20, 2:16 am, Ian <ianb...@mobileaudio.comwrote:
rick wrote:
hi
Is there a DB2 equivalent of Informix.Extend function?
Although there may be a few Informix people here, it would
be helpful for the rest of us if you tell what this function
does.
Or at least provide a pointer to the reference material
for the function.