× 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.



From Gord
<snip>
I just copy/pasted your script and I did not get a value of 2. After
doing
the update I got:

ID MYTEXT
1 a

We're still on 7.1
</snip>


From IBM:
<snip>
Before IBM® i 7.2, an UPDATE statement that set a GENERATED ALWAYS or
GENERATED BY DEFAULT identity or rowid column and specified the OVERRIDING
USER VALUE clause would not update the column value. In 7.2, specifying
the OVERRIDING USER VALUE clause on an UPDATE statement assigns a new
system generated value for a GENERATED ALWAYS or GENERATED BY DEFAULT
identity or rowid column if the identity or rowid column is included in
the UPDATE assignment clause.
</snip>

Key points.

7.1 and earlier ignored the OVERRIDING USER VALUE and used the user value
instead of overriding user value with the system value.

If you don't want it changed, then don't put it in the assignment clause
of the UPDATE statement. IOW don't do a SET ID=anything if you want ID to
keep it's previous value.



Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.