× 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 12-Jan-2016 17:11 -0700, Rob wrote:
This is valid in MySQL...

INSERT INTO Table SET "Field"='Value" ;

But I get a "Token SET is not a valid Token"...

I do not expect DB2 to support everything MySQL does... just looking
for some clarification.. is this possible? Or is my syntax just
wrong?

I have a SaveRec function.... on an update... it uses the where
clause to look up the old rec and compare the fields and only replace
those that are different and log the changes, (who, when, table,
fields, before, after)...

MySQL made it convenient allowing a SET to be used with an INSERT as
well as an UPDATE... thus I only had to build a SET string and not
bother with a ( Fields ) & Values () string...


When ANS SQL enables that same /convenience/ as syntax alternative, then the Db2 for IBM i SQL probably eventually also will include that syntax [or whatever syntax is agreed-upon instead, by the standards committee].


I did google right down to just INSERT INTO SET... got nothing...

Power8 v7r1 PHP DB2


No need to use Google. The KnowledgeCenter with documentation for the DB2 for i SQL INSERT statement shows no such capability\alternative-syntax; the result of repeated Ctl-F [or whatever is used for Find-in-Page] used to locate "SET" should reveal, per the conspicuous absence of *SET* in bold text, _why_ the use of the token=SET was diagnosed as invalid syntax:
[http://www.ibm.com/support/knowledgecenter/api/content/ssw_ibm_i_71/db2/rbafzbackup.htm]


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.