Re: Combining Query Outputs
- From: Vincent Johns <vjohns@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 01 Feb 2006 01:52:12 GMT
Lucy,
Yes, just put the commands you want ("copy", etc.) into a text file, save it with an extension of "BAT", such as "Sortem.bat", and invoke it by writing a Macro with a RunApp action that runs your *.BAT file.
-- Vincent Johns <vjohns@xxxxxxxxxxxxxxxxxx> Please feel free to quote anything I say here.
Lucy wrote:
Thanks so much Vincent! :) It works like a charm!
Do you know if there is a way to run this command-line out of access? Eg. by using a macro?
Thanks again for all your help!
"Vincent Johns" wrote:
Lucy,
To combine them, you could use the command-line commands
copy file1.txt + file2.txt + file3.txt unsorted.txt sort <unsorted.txt >sorted.txt del unsorted.txt
to do it, where your 3 files are file1.txt, file2.txt, and file3.txt, and your final sorted output is to go to the file "sorted.txt".
Be sure to use file names (instead of "unsorted.txt" and "sorted.txt") that aren't already in use for real files in the folder you're using.
Or you could use Notepad to combine them, if they're not too large, by opening each one in Notepad and copying the entire contents to another file in Notepad, then saving the result.
I don't know what you mean by "the data is wrapped". If you're using Notepad, you can unwrap the lines by clicking on Format and de-checking the "Word Wrap" option. That won't change the contents of the file, but will change how they appear in the Notepad window.
-- Vincent Johns <vjohns@xxxxxxxxxxxxxxxxxx> Please feel free to quote anything I say here.
Lucy wrote:
Hi Vincent,
Thanks so much for the reply.
Each of the 3 queries have their own different, specific file layout that I am currently exporting to 3 different text files. Is there a way to export each of them and then append them to the same text file?
Also, when I export the data from 2 of the files, the data is wrapped, do you know if there is a way to avoid this?
Thanks so much for your help Vincent.
"Lucy" wrote:
Hi,
I have 3 queries that have totally different field outputs.
Once I have run each of these 3 queries, I would like to combine their output in one file. Their output would be on different lines, the ouput of query 1 in the first couple of lines, followed by the output of the second query on the following lines etc. but all included in one file . Is there a way to do this?
Thanks in advance for your help.
.
- Follow-Ups:
- Re: Combining Query Outputs
- From: Lucy
- Re: Combining Query Outputs
- Prev by Date: Re: SELECT COUNT(Distinct surname)
- Next by Date: Re: How do I lookup values for mulitple columns in Access?
- Previous by thread: Re: IIF question getting #ERROR Message
- Next by thread: Re: Combining Query Outputs
- Index(es):
Relevant Pages
|