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



On 06 Mar 2013 07:21, Michael Ryan wrote:
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?

Given the specific DDL for a scenario [i.e. a specific TableA and TableB], there might be an acceptable option to perform effectively what is desired, without using a column-list specification.

However generically, the SQL INSERT is not conducive to effect the FMTOPT(*MAP) because the data is inserted by column positions rather than by column names; and no option to override that behavior :-( Probably the best bet to accomplish that generically, is to write a program that uses dynamic SQL [as stored procedure] to build the statement to do [or perhaps to create a VIEW to enable] the insert.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.