|
Rob,
The DB2 for i syntax is:
INSERT INTO Table
(Column1, Column2, etc.)
Values (Value1, Value2, etc.)
Jim
________________________________________
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxx> on behalf of Rob <rob.couch@xxxxxxxxxxxxxx>
Sent: Tuesday, January 12, 2016 7:11 PM
To: Midrange Systems Technical Discussion
Subject: INSERT INTO Table SET "Field"='Value" ;
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...
I did google right down to just INSERT INTO SET... got nothing...
Power8 v7r1
PHP
DB2
Thanks,
Rob
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
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.