What release are you on?
Create Table ...
As (Select ....)
With Data
Including identity column attributes;;
Works for me (on Release V5R4M0)
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
-----Ursprüngliche Nachricht-----
Von: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von Gangasani, Bhargava
Gesendet: Wednesday, 14. July 2010 13:20
An: midrange-l@xxxxxxxxxxxx; rpg400-l@xxxxxxxxxxxx
Betreff: Hi - Need help to create SQL table with multiple field reference
files and identity
Hi,
I need to create a SQL table by using multiple field reference files
in which one of the reference file has identity column. My requirement
is to get the identity column attributes also to the target file along
with the definitions of other fields from other field reference files.
When I have run the following create table statement:
CREATE TABLE ICIWRKLXP/E0TFTBLP5 (E0TRDT,
E0TRNO, E0EXPT) AS
(SELECT A.TRDT, A.TRNO, B.EXPT
FROM FREFFIL A,
FREFFIL6 B) WITH DATA INCLUDING IDENTITY
The file ICIWRKLXP/E0TFTBLP5 is getting created but the identity
column attributes are not coming to ICIWRKLXP/E0TFTBLP5.
Could anyone help me in this?
FREFIL6:
CREATE TABLE ICIWRKLXP/FREFFIL6 (
EXPT INT NOT NULL GENERATED ALWAYS
AS IDENTITY (START WITH 1 INCREMENT BY 1 MINVALUE 1 NO
MAXVALUE CYCLE NO CACHE ORDER))
FREFIL:
It is normal table with TRDT 8 CHAR. TRNO 7S 0.
Thanks,
Bhargava.
2009 Winner: Broadridge receives Top Overall Honors" for 2 consecutive
years in the Black Book of Outsourcing Brokerage Process Service Provider
Survey. Learn more at
http://www.broadridge.com/ranked1/
THANK GOD ITS MONDAY! Sounds interesting? Know more @ www.broadridge.com.
This message and any attachments are intended only for the use of the
addressee and may contain information that is privileged and confidential.
If the reader of the message is not the intended recipient or an authorized
representative of the intended recipient, you are hereby notified that any
dissemination of this communication is strictly prohibited. If you have
received this communication in error, please notify us immediately by e-mail
and delete the message and any attachments from your system.
As an Amazon Associate we earn from qualifying purchases.