|
create table HPDOCU_DELETE_TRACKING
as (select DHDOID
from HPDOCU )
with no data
Works fine at v5r2 or higher.
You can also specify "with data" to have the new table loaded
automatically from the old one.
HTH,
Charles Wilt
--
iSeries Systems Administrator / Developer
Mitsubishi Electric Automotive America
ph: 513-573-4343
fax: 513-398-1121
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of David C. Shea
Sent: Thursday, October 27, 2005 1:41 PM
To: midrange-l@xxxxxxxxxxxx
Subject: SQL CREATE TABLE AS...
In Oracle, I can create a new table by referencing fields in another
table. For example:
create table bakerc/drivetest as select rpdoc, rpdct, rpkco from
pristdta/f03b11 where 1=2
will create table DRIVETEST in lib BAKERC with just those three fields.
I would like to be able to do this on the AS400, but this syntax doesn't
work.
It appears that you can't do this on an AS400... I'm hoping someone can
prove me wrong??
******************************************************
Go... FASTER! Without an Upgrade!
ARCTOOLS/400(tm) and ReorgWizard(tm)
http://www.arctools.com
DCSoftware, Inc.
(508) 435-8243
(508) 435-4498
******************************************************
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.