Re: Transfertext enclose number fields in quotes

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Oct 13, 1:07 pm, NancyM <Nan...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
The csv format with quotation marks around each field is a request by a
software vendor who will be importing our data into an Oracle database.  Is
there a better method?

thank you.



"Jeff Boyce" wrote:
Nancy

The quotes serve to delimit characters/text.  Why do you want quotes around
your numbers?

Assuming that you do not need to use those "numbers" as actual numbers (add,
subtract, ...), create a query and coerce those "numbers" into string
characters, then export from that query.  Take a look at Access HELP for the
CStr() function.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or psuedocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"NancyM" <Nan...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:B90EABFF-6544-4C62-AE9D-91F039B1A33C@xxxxxxxxxxxxxxxx
I am using  MS Access 2007.  I have query I wish to export in csv format.
I
placed the following code on the form to execute by pressing a button:

strDoc = "Sales"
strExportFile = "C:\ Documents and Settings\UserName\My
Documents\FolderName\Sales.csv
Docmd.TransferText acExportDelim, , strDoc, strExportFile, False

The resulting csv file only encloses text field in double quotes.
How do I get my number fields enclosed in double quotes?  I want to use
vba
code in a form so all I have to do is press a button.

Thank you for any help.- Hide quoted text -

- Show quoted text -

Oracle doesn't require quotes around numbers. Dates, I think yes, but
not regular numbers.
.



Relevant Pages

  • Re: Transfertext enclose number fields in quotes
    ... functions in the query. ... This author may have received products and services mentioned ... Docmd.TransferText acExportDelim,, strDoc, strExportFile, False ... How do I get my number fields enclosed in double quotes? ...
    (microsoft.public.access.externaldata)
  • Re: Transfertext enclose number fields in quotes
    ... functions in the query. ... This author may have received products and services mentioned ... Docmd.TransferText acExportDelim,, strDoc, strExportFile, False ... How do I get my number fields enclosed in double quotes? ...
    (microsoft.public.access.externaldata)
  • Re: how to link to a csv file with a date field in it?
    ... Regarding the scheduler it's in XP and above - if you aren't familiar with using the Windows Task Scheduler, here is a link to a fairly clean, simple, short tutorial. ... I think you have the right idea - link to the csv, maybe run an append query to process the contents into your main table, in that query you can fix things such as the date. ... s is the complete row of data as a string, flag is a boolean that is initialized to be False. ... The full code I snipped this from contains so much checking for quotes and # hashes and internal commas and internal single quotes replacing certain chars, that it's difficult for me to follow and I wrote it. ...
    (microsoft.public.access.externaldata)
  • Re: how to link to a csv file with a date field in it?
    ... I think you have the right idea - link to the csv, maybe run an append query to process the contents into your main table, in that query you can fix things such as the date. ... s is the complete row of data as a string, flag is a boolean that is initialized to be False. ... We can create a recordset object and set it to a specific table - we add the new row one field at a time, testing each field for type using a select case, add the # for dates or ' for text or nothing for numeric field types to the fldArrrayelement contents and the set rs.fields= the resulting expression. ... The full code I snipped this from contains so much checking for quotes and # hashes and internal commas and internal single quotes replacing certain chars, that it's difficult for me to follow and I wrote it. ...
    (microsoft.public.access.externaldata)
  • Aging Function
    ... I took your advice and the query worked! ... total debits for those accounts, ... >problem with using the accounts as criteria. ... >it was a result of the missing single quotes. ...
    (microsoft.public.access.modulesdaovba)