|
James, Sure, just: Insert into myfile ( Select <....> from myfile Union distinct Select <....> from f2 Union distinct Select <....> from f3 Union distinct Select <....> from f4 ) The entire results set is built before any record is inserted. Charles Wilt -- iSeries Systems Administrator / Developer Mitsubishi Electric Automotive America ph: 513-573-4343 fax: 513-398-1121 -----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of James H H Lampert Sent: Thursday, November 10, 2005 8:28 PM To: Midrange Systems Technical Discussion Subject: Re: SQL newbie question "Wilt, Charles" wrote: > Assuming that the a key collision means the rest of the >record is the > same too, then all you need is: > Insert into myfile ( > Select <....> > Union distinct > Select <....> > Union distinct > Select <....> > ) Yes, but is there a convenient way to UNION what's going into a file with what's already there? -- JHHL
As an Amazon Associate we earn from qualifying purchases.
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.