|
Hi All,
I have a table with a unique_id column defined as GENERATED ALWAYS.
CREATE TABLE HJWMS/T_IMPORT_ITEM_MASTER FOR SYSTEM NAME WIITM (
UNIQUE_ID INTEGER GENERATED ALWAYS AS IDENTITY (
START WITH 1 INCREMENT BY 1
NO MINVALUE NO MAXVALUE
NO CYCLE NO ORDER
NO CACHE ) ,
IMPORT_ID VARCHAR(60) ALLOCATE(10) CCSID 37 NOT NULL ,
IMPORT_STATUS FOR COLUMN IMP_STATUS VARCHAR(10) ALLOCATE(10) CCSID 37
NOT NULL ,
...
CONSTRAINT HJWMS/Q_HJWMS_WIITM_UNIQUE_ID_00001 PRIMARY KEY( UNIQUE_ID
) )
RCDFMT WIITM ;
The data structure is defined as
D wiitm_Ds...
D e ds extname(wiitm)
D qualified inz
My insert statement is
Exec sql
INSERT INTO wiitm VALUES :wiitm_Ds;
When I try to compile the program I get the errors
SQL0117: Statement contains wrong number of values.
SQL0798: Position 1 Value cannot be specified for GENERATED ALWAYS column
UNIQUE_ID.
Without listing all the columns individually on the insert statement is
there a way to insert the data structure?
Thanks,
Rob
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD
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.