× 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.



Hi David,

Yes you can. You need to specify WITH DATA or WITH NO DATA at the end of the statement, as in

create table test2 as (select empno, firstnme from sqlstand.employee where workdept = 'A00') with data;

hth

Regards

Paul Tuohy
ComCon
+353 1 282 6230
www.comconadvisor.com


----- Original Message ----- From: "David C. Shea" <dshea@xxxxxxxxxxxx>
To: <midrange-l@xxxxxxxxxxxx>
Sent: Thursday, October 27, 2005 6:40 PM
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 thread ...

Follow-Ups:
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.