Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

creating table using sql select

3 views
Skip to first unread message

Marek Cwynar

unread,
Apr 20, 2001, 4:00:46 PM4/20/01
to
When I coded in visual foxpro creating table by sql command was very easy I
simply wrote command. Having table with tablename1:
select * from tablename1 into table tablename2
and this created second table tablename2.
How can I achive such table when writing sql commands on AS400?
For example what I am supposed to do after command strsql?

Mark

Dave Hamilton

unread,
Apr 20, 2001, 4:54:46 PM4/20/01
to
Same just remember to use lib/file

Select * from blglib/patdata into dwh/myfile

Dave

ScottM

unread,
Apr 22, 2001, 1:20:38 AM4/22/01
to
Dave,

Can you provide a bit more information?

I am unable to make this work in interactive SQL.

Dave Hamilton <hami...@pbssite.com> wrote in message
news:3ae0a1f4....@west.usenetserver.com...

Rolf Mittag

unread,
Apr 22, 2001, 4:47:35 AM4/22/01
to
Never got it to run that way,
in interactive SQL press F13, change output
to database file, enter the desired name and
then select * from <lib>/<tbl>. This will create
the table with the same layout. Don't forget to
set output back to display <g>.

It is not quite the same as originally required
because the layout of the table is the same
but e.g. constraints are not duplicated.

You can however take the good old CRTDUPOBJ ;-)

Rolf

---------------------------
Dipl.Inf.(FH) Rolf P Mittag
IBM Partner in Development
Leipziger Str. 50
D-69214 Eppelheim
Fon: +49 (6221) 76 78 60
Fax: +49 (6221) 76 80 26
eMl: r...@r-m-e-d-v.de


0 new messages