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