Export a query into a delimited txt


L

lsyrkin

I need to export a query containing fields with different number of
Decimal Places into a delimited txt file. The query contains numeric
and text types, so the text fields has to be exported in quotes("). If
I use "export formatted", I get all numbers according to the query
Formats settings but the resulting file contains extra formattings and
lines that I don't need. If I use Format function in the query for my
numeric fields, they are converted into the text type and are being
exported in quotes. It looks like a very common problem and I expect
someone has a simple solution.

I will appreciate any clues.

Leonid
 
Ad

Advertisements

F

Fred

You seem to be conflicting with yourself in that you are talking about
creating a text file, but then you say that it's a problem when a number gets
converted to "text type." Text is a way to store and display a number.
And text files do not have field types the way that fields etc. do in Access.


- - - -

I find File->Export to be a foolproof way of exporting. It gives you lots
of choices. And if there's still stuff in the result that you don't want,
take it out in a text editor, including using global "fined and replace"
functions where needed.
 
Ad

Advertisements

L

lsyrkin

You seem to be conflicting with yourself in that you are talking about
creating a text file, but then you say that it's a problem when a number gets
converted to "text type."   Text is a way to store and display a number. 
And text files do not have field types the way that fields etc. do in Access.

-  -  -  -  

I find File->Export to be a foolproof way of exporting.    It gives you lots
of choices.   And if there's still stuff in the result that you don't want,
take it out in a text editor, including using global "fined and replace"
functions where needed.  







- Show quoted text -

Sorry if I was not clear. I try to explain. I have to export data
according to some specs. The data should be in a "|" delimited ASCII
file, like following:

VARCHAR2(20)|NUMBER(8,3)|NUMBER(4.1)|NUMBER(5,2)
Descr1|Val1|Val2|Val3
"abcd"|12345.678|123.4|123.45

Using a text editor is not an option because of 2 reasons - I need to
automate the export and too much data to edit.

Thank you,
Leonid
 

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