On 3/6/2013 4:30 PM, Stone, Joel wrote:
Just curious why not use cpyf? It is simple and clean. Are you looking for embedded RPG or portability?
Try this:
create table qgpl.quitethelongtablename (text char(50))
cpyf QUITE00001 qgpl/quitebk crtfile(*yes)
Yoink! CPF327E Alternative name for file QUITEBK not allowed.
Now, for a surprise, try this:
rnmobj QUITE00001 *file quitebk
create table qgpl.quitethelongtablename (text char(50))
Surprise! SQL0601 QUITETHELONGTABLENAME in QGPL type *FILE already exists.
I didn't expect either of these effects, although I now understand why
they occur.
--buck
-----Original Message-----
From: Michael Ryan
Sent: Wednesday, March 06, 2013 9:21 AM
To: Midrange Systems Technical Discussion
Subject: SQL INSERT FMTOPT(*MAP *DROP)
I need to insert corresponding columns from TableB into TableA. TableB has
more columns than TableA. All the rows will be inserted. I need the
equivalent of CPYF FMTOPT(*MAP *DROP). I don't want to specify all the
column names if I don't have to. Any ideas?
Thanks!