Problems exporting a query to a .txt file (1 Viewer)

jcsuarez

jcsuarez
Local time
Today, 09:17
Joined
Dec 10, 2009
Messages
44
I´m having trouble exporting a query from ACCESS 2010 to a .txt file. I have a field in the middle of the query, and I cannot get the data of this field unless I put it in the end of the query (as the last field). I think I must be doing something wrong, but I don´t known what may that be. Any help, please?
 

vbaInet

AWF VIP
Local time
Today, 13:17
Joined
Jan 22, 2010
Messages
26,374
A very vague explanation!

1. What is this field? Is it a calculated value for example?
2. What is the SQL of the query you're trying to export?
3. How are you exporting the query? Using code or through the Import/Export wizard?
 

jcsuarez

jcsuarez
Local time
Today, 09:17
Joined
Dec 10, 2009
Messages
44
Thank you, vbaInet for your prompt answer.
The field name is ENTRADA, and the data are taken and selected from a Table named RESULTADOS. The field is text, and there´s only one other field that is text, which is CódECR. All other fields are numbers, but none of them are calculated in this query. They´re just selected from the Table RESULTADOS.
When I export this query to a txt file, the field ENTRADA will show up only if its located at the end of the query. The SQL command follows. The field shows nicely in ACCESS but I cannot get it into the txt file.

SELECT RESULTADOS.CódECR, RESULTADOS.PAR, RESULTADOS.Rep, RESULTADOS.TRAT, RESULTADOS.REND, RESULTADOS.ENTRADA
FROM ([ENSAYO ELEGIDO] INNER JOIN ENSAYOS ON ([ENSAYO ELEGIDO].CódECR = ENSAYOS.CódECR) AND ([ENSAYO ELEGIDO].LOCALIDAD = ENSAYOS.LOC)) INNER JOIN RESULTADOS ON ENSAYOS.CódECR = RESULTADOS.CódECR
WHERE (((RESULTADOS.TRAT)<1000))
WITH OWNERACCESS OPTION;
 

vbaInet

AWF VIP
Local time
Today, 13:17
Joined
Jan 22, 2010
Messages
26,374
What is contained in Entrada? A long block of text?
 

jcsuarez

jcsuarez
Local time
Today, 09:17
Joined
Dec 10, 2009
Messages
44
Yeah, some of the ENTRADAS have about 20 or 30 characters
 

jcsuarez

jcsuarez
Local time
Today, 09:17
Joined
Dec 10, 2009
Messages
44
I´m trying to export it as txt file with Export Command, as an fixed column width file. I´m attaching an image so that you can see the data as well as the specification of the exportation
 

Attachments

  • query export.jpg
    query export.jpg
    106.9 KB · Views: 65

Users who are viewing this thread

Top Bottom