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



nutshell the resulting statement would be simliar to this
insert into mylib/myfile (select a.*, 'MYNEWFILE' from mynewlib/mynewfile
a
union all select b.*,'MYOTHERFILE' from myotherlib/myotherfile b )

so records from the mynewfile would have the last column = 'MYNEWFILE' and
the records from myotherfile the last column would contain 'MYOTHERFILE'
and all of the records would be placed into MYFILE.


Thanks,
Tommy Holden



From: "Dennis Lovelady" <iseries@xxxxxxxxxxxx>
To: "'Midrange Systems Technical Discussion'"
<midrange-l@xxxxxxxxxxxx>
Date: 03/16/2010 09:42 AM
Subject: RE: Select mytable name from mytable?
Sent by: midrange-l-bounces@xxxxxxxxxxxx



for the insert you *should* be able to do something along the lines of
mystatement = 'INSERT INTO MYLIB/MYFILE (SELECT A.*, ''' + MYFILENAME +
''' FROM ' + %TRIM(MYNEWLIB) + '/' %TRIM(MYNEWFILE) + ' A UNION ALL
SELECT
B.*, ''' +
MYOTHERFILENAME + ''' FROM ' + %TRIM(MYOTHERLIB) + '/' +
%TRIM(MYOTHERFILE) + ' B )';

exec sql execute immediate :mystatement;

Yes. So I create myfile. Then I do this insert, a million times. Then I
rename the file to mynewname. Then I select mytable from mynewname. Why
does the output show "myfile" when the file is clearly named "mynewname?"
What am I doing wrong?

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"If you become a star, you don't change, everyone else does."
-- Kirk Douglas




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.