Query - export to text file format

akb

Registered User.
Local time
Today, 05:58
Joined
Jul 21, 2014
Messages
57
I currently have a query pulling data from a database - I need to now export the data to a text file to import it into a different database. I need the format to be like below. Wondering how I can tell the query to go to the second line and then the third line like below.

*,9215146,BUILDERS LLC,4285 NICOLET,DALLAS,TX,75201
P,2
C,2,,BRD

Thank you!
Ashley
 
First at all, Access can export in many formats and many other DBs can import directly from Access. So, if you will tell us what is this "other" database, someone can provide a better solution for you.

If you will not find this better solution until tomorrow, I'll help you to create a .txt file from your query.
Just give me a model (a small DB in 2003 format).
 
I am exporting data from our point of sale system and importing into our accounting software. The data I need to import cannot be directly imported - in other words I cannot create an append query to complete this. I need to manually import a text file.

I can create the text file, just curious if there is a formula or method to tell the data to go to line 2 or 3 and at what point.
 
Insert a carriage return (chr 13) where you need.
 
Sorry, but can you elaborate on that a bit? Is that what I type in the query field?
 
I can create the text file, just curious if there is a formula or method to tell the data to go to line 2 or 3 and at what point.

Rectification:
You can NOT create the text file. You can EXPORT as text file :) . It is not the same thing.

Here (see the attachment) is how you can really create a text file.
Hope this will be a help for you.
 

Attachments

My mistake - I did mean export. :) I figured it out with the Chr(13) and Chr(10).

SELECT [T_Estimate Import].
[*] AS Test, [T_Estimate Import].JobNum, [T_Estimate Import].Cust_Name, [T_Estimate Import].JobAddr1, [T_Estimate Import].Job_City, [T_Estimate Import].Job_State, [Job_Zip] & Chr(13) & Chr(10) & [P] AS Zip, [PHASE3] & Chr(13) & Chr(10) & [C] AS Phasee, [T_Estimate Import].PHASE3, [T_Estimate Import].Blank, [T_Estimate Import].BRD
FROM [T_Estimate Import];

This exports the information exactly how I need it:

*,9215146,BUILDERS LLC,4285 NICOLET,DALLAS,TX,75201
P,2
C,2,,BRD

Thank you for your help!
 

Users who are viewing this thread

Back
Top Bottom