export query to delimited csv file

N

ndt

I have a query that I would like to export to a pipe delimined csv
file. Can someone let me know how to do that similar to exporting a
table where I am given options on the delimiters and format?

When I use the outputto command with a macro, it does not give me the
option to identify the delimiters.

I cannot use transfer text because it is a query and not a table.

I cannot make the query into a table because i lose the date format
from yyyy-mm-dd to dd/mm/yy and I that is not the format it needs to
be in.


Any help is much appreciated
 
R

rquintal

I have a query that I would like to export to a pipe delimined csv
file. Can someone let me know how to do that similar to exporting a
table where I am given options on the delimiters and format?

When I use the outputto command with a macro, it does not give me the
option to identify the delimiters.

I cannot use transfer text because it is a query and not a table.

I cannot make the query into a table because i lose the date format
from yyyy-mm-dd to dd/mm/yy and I that is not the format it needs to
be in.

Any help is much appreciated

use transfertext. It does work on a query.
 
N

ndt

use transfertext. It does work on a query.

I did get it to work using transfertext but i am again losing the date
format and I am not sure how to get it pipe delimited instead of
comma. any ideas?
 
A

Albert D. Kallal

I did get it to work using transfertext but i am again losing the date
format and I am not sure how to get it pipe delimited instead of
comma. any ideas?

You need to *manually* export the query, and then the export wizard will
launch. that wizard will give you a chance to set the delimiter, and other
options (like include field names on the first row).

You need to ***save*** this export spec. (use the advanced button on export
wizard, and then choose the save-as.

As for the date export field, in your query just force it with a format
command:

eg, in the query builder type in:

MyExDate:format([YourDateField],"mm/dd/yyyy")

Once you built the query, saved the export spec, then when you use transfer
text, you can *specify* your spec you saved, and it will respect all of the
settings like delimiter, 1st row contains field names etc.

So, build your query, set format for date as above.
Next, export manually, build + save the spec
Then, use transerText with the spec you made....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top