|
Hi Everyone, Is there a way to do the following? I have two files, FILEA & FILEB, which have identical formats In a program, I want to select all records from both files using embedded SQL, so I 1) define a data structure using EXTNAME to base it on FILEA, 2) declare a cursor for the union of the two files, and 3) fetch the cursor into the data structure. So far, so good -- that all works fine. Now, I want to add an extra field telling me what file the fields came from -- in other words, I want a statement something like: select 'FROMFILEA', A.* from FILEA A UNION select 'FROMFILEB',B.* from FILEB B I still want to put the result into a data structure (since I don't want to type in all the field names), but the data now no longer matches the file structure. Is there a way to define a data structure that is partly externally-defined and partly internally-defined? Or to have a data structure that includes another data structure? Or something?? TIA, Mike Naughton Senior Programmer/Analyst Judd Wire, Inc. 124 Turnpike Road Turners Falls, MA 01376 413-863-4357 x444 mnaughton@juddwire.com
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.