×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
On 23 May 2013 12:23, aec wrote:
A word of caution, I recently discovered if you have a
DDS-defined or SQL-defined DATE or TIMESTAMP or TIME field in a file,
and insert a record using a field list but do not include that field
name in the list for the values, the write will automatically use the
current timestamp.
When using the SQL statement "INSERT (column-list)
VALUES(list-of-values)", the SQL will insert whatever is the DEFAULT for
the columns not in the column-list. No caution required; i.e. it does
what it does, according to the definition of the column.
For a DDS field\column for which no DFT() was specified, the
date\time\timestamp data types are generated by the DDS compiler to have
the effective CURRENT register for the respective type. I believe this
was the chosen effect, instead of providing one or more special value(s)
for the DFT() specification; i.e. they avoided adding something like
DFT(*CURRENT) or each of DFT(*CURDATE), DFT(*CURTIME), and
DFT(*CURTIMESTAMP). Since before the introduction of these types, the
syntax diagram of the DFT (Default) keyword has remained:
DFT('value' | numeric-value | X'hexadecimal-value' | *NULL)
Query the SYSCOLUMNS catalog VIEW to see the default value to verify
that the effect is as revealed by the catalog. For the DDS data types
L\T\Z, the default value established for field without ALWNULL
specification, will be respectively: CURRENT_DATE, CURRENT_TIME, and
CURRENT_TIMESTAMP. When ALWNULL is specified for a DDS column with one
of these types, IIRC the default DFT() is overridden to effectively be
DFT(*NULL) if left unspecified for the column.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.