On 15 Mar 2013 10:37, Birgitta Hauser wrote:
CRPence on Frida, 15.3 2013 18:06 wrote:
On 15 Mar 2013 07:54, Anderson, Kurt wrote:
<<SNIP>>
One thing I learned about was being able to have my SQL table
automatically set the last change timestamp field w/o me doing it.
Example:
ChgDate TIMESTAMP FOR EACH ROW ON UPDATE AS ROW CHANGE TIMESTAMP NOT NULL
<<SNIP>>
I had Insert into BillAgentP Values(:ds_Insert);
Where ds_Insert is a Qualified DS defined like the file. But now
that doesn't work b/c it doesn't like that I'm updating ChgDate.
<<SNIP>>
That specification "Indicates the column is not visible in SQL
statements unless it is referred to explicitly by name. For
example, SELECT * does not include any hidden columns in the
result." Perhaps the DS defined with the external TABLE honors [or
should honor] that?
But if he defines an external data structure all columns (implicitly
hidden or not are included) and when reading a record with SELECT *
you'll get huge problems! <<SNIP>>
Hmm. Seems at that point then, the issue is just with the RPG... and
thus is more appropriately addressed on RPG400-l vs midrange-l
From an SQL perspective... Yet there may also be the OVERRIDING USER
VALUES clause? Perhaps the GENERATED needs to be explicitly included on
the CHGDATE column declaration [instead of that being merely implied] to
make the "overriding" effective... if even it is supported to do so; the
docs seem only ever to mention IDENTITY.