× 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 13:18, Voris, John wrote:
On 06 Mar 2013 08:01, CRPence wrote:
<<SNIP>> 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

This got me thinking. I do not recall seeing anything in the Paul
Conte SQL book relative to this.
But after one does a field mapping, is it allowed to do a load in
SQL by column number ?

Could one do something like . . .

INSERT into NEW_FILE
SELECT 1,2,4,7 FROM OLD_FILE

. . . I expect that it is bad form, but does SQL tolerate it ?


The SQL can tolerate that [with effective DECFMT(*PERIOD)], but probably not producing the desired effect.

Column numbers are not a feature of the select-list; ¿only? the ORDER BY allows that effective capability. Instead, the subselect considers each of those comma-separated values as literal\constant expressions; however with the dilemma for, when running where comma is decimal separator, to decide whether that might be the equivalent of values(1.2, 4.7) or values(1, 2, 4, 7) or perhaps even values(1, 2.4, 7) to be selected for every row of OLD_FILE.


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.