Export to .txt tuncates decimals

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

I am trying to export a table to a comma delimited text
file. When the export is complete I notice that number
fields that have been formatted to display 4 decimal
places are truncated when I export the file.

Implemeting the solution offered by Microsoft "Microsoft
Knowledge Base Article - 208408" seems to convert my
number fields into text objects during export.

What I am trying to accomplish is create a text data file
that ONLY encloses my text fields with quotes. This is
the case when I export my table, but the truncation
problem changes my data as in the following example:
"A0A 1B0","AVONDALE","NL",47.41,53.19

The last two fields should be formatted to 4 decimal
places (as they are in my original table).

Creating a query and formatting the number fields to four
places, exports the data to four places but encloses the
fields in quotes as:
"A0A 1B0","AVONDALE","NL","53.1975","47.4162"

What I need is the data file to export the number fields
as numbers NOT characters as;
"A0A 1B0","AVONDALE","NL",53.1975,47.4162

How can this be accomplished???
Thanks,
Chris
 
Chris said:
I am trying to export a table to a comma delimited text
file. When the export is complete I notice that number
fields that have been formatted to display 4 decimal
places are truncated when I export the file.

Implemeting the solution offered by Microsoft "Microsoft
Knowledge Base Article - 208408" seems to convert my
number fields into text objects during export.

What I am trying to accomplish is create a text data file
that ONLY encloses my text fields with quotes. This is
the case when I export my table, but the truncation
problem changes my data as in the following example:
"A0A 1B0","AVONDALE","NL",47.41,53.19

The last two fields should be formatted to 4 decimal
places (as they are in my original table).

Creating a query and formatting the number fields to four
places, exports the data to four places but encloses the
fields in quotes as:
"A0A 1B0","AVONDALE","NL","53.1975","47.4162"

What I need is the data file to export the number fields
as numbers NOT characters as;
"A0A 1B0","AVONDALE","NL",53.1975,47.4162

How can this be accomplished???
Thanks,
Chris

Look at "User-Defined Numeric Formats" in help.

Create a query and format the field that require decimal points,
then export the query.

Amount: Format(SomeTable.Amt, "##,###.0000")

Look at the format function in help. You can use different characters
in the mask and product different results.

Ron
 
Hi Chris,

You can include the quotes in your query by using calculated fields,
e.g.
fTextField: """" & [TextField] & """"
and then export it without adding quotes at that stage.
 
-----Original Message-----


Look at "User-Defined Numeric Formats" in help.

Create a query and format the field that require decimal points,
then export the query.

Amount: Format(SomeTable.Amt, "##,###.0000")

Look at the format function in help. You can use different characters
in the mask and product different results.

Ron
--
Ronald W. Roberts
Roberts Communication
(e-mail address removed)
To reply remove "_at_robcom_dot_com"


.

Your suggestion is exactly what Knowledge Base Article -
208408 tells to do. However it does not provide a
solution to my problem.
Respectfully,
Chris
 
-----Original Message-----
Hi Chris,

You can include the quotes in your query by using calculated fields,
e.g.
fTextField: """" & [TextField] & """"
and then export it without adding quotes at that stage.

I am trying to export a table to a comma delimited text
file. When the export is complete I notice that number
fields that have been formatted to display 4 decimal
places are truncated when I export the file.

Implemeting the solution offered by Microsoft "Microsoft
Knowledge Base Article - 208408" seems to convert my
number fields into text objects during export.

What I am trying to accomplish is create a text data file
that ONLY encloses my text fields with quotes. This is
the case when I export my table, but the truncation
problem changes my data as in the following example:
"A0A 1B0","AVONDALE","NL",47.41,53.19

The last two fields should be formatted to 4 decimal
places (as they are in my original table).

Creating a query and formatting the number fields to four
places, exports the data to four places but encloses the
fields in quotes as:
"A0A 1B0","AVONDALE","NL","53.1975","47.4162"

What I need is the data file to export the number fields
as numbers NOT characters as;
"A0A 1B0","AVONDALE","NL",53.1975,47.4162

How can this be accomplished???
Thanks,
Chris

Your suggestion seems to add quotes. My situation
requires that I export the decimal fields WITHOUT quotes.
In fact I am already using a format to create the
required number: Format([number_field],"0.0000")

Respectfully,
Chris
 
The idea is that the query should add quotes to the *text fields only*.
Then export the query without adding quotes at that stage (i.e. set the
"Text Qualifier" dropdown in the text export wizard to {None}).

-----Original Message-----
Hi Chris,

You can include the quotes in your query by using calculated fields,
e.g.
fTextField: """" & [TextField] & """"
and then export it without adding quotes at that stage.

I am trying to export a table to a comma delimited text
file. When the export is complete I notice that number
fields that have been formatted to display 4 decimal
places are truncated when I export the file.

Implemeting the solution offered by Microsoft "Microsoft
Knowledge Base Article - 208408" seems to convert my
number fields into text objects during export.

What I am trying to accomplish is create a text data file
that ONLY encloses my text fields with quotes. This is
the case when I export my table, but the truncation
problem changes my data as in the following example:
"A0A 1B0","AVONDALE","NL",47.41,53.19

The last two fields should be formatted to 4 decimal
places (as they are in my original table).

Creating a query and formatting the number fields to four
places, exports the data to four places but encloses the
fields in quotes as:
"A0A 1B0","AVONDALE","NL","53.1975","47.4162"

What I need is the data file to export the number fields
as numbers NOT characters as;
"A0A 1B0","AVONDALE","NL",53.1975,47.4162

How can this be accomplished???
Thanks,
Chris

Your suggestion seems to add quotes. My situation
requires that I export the decimal fields WITHOUT quotes.
In fact I am already using a format to create the
required number: Format([number_field],"0.0000")

Respectfully,
Chris
 
Now I get it. Kewl.. it works
Thanks
-----Original Message-----
The idea is that the query should add quotes to the *text fields only*.
Then export the query without adding quotes at that stage (i.e. set the
"Text Qualifier" dropdown in the text export wizard to {None}).
-----Original Message-----
Hi Chris,

You can include the quotes in your query by using calculated fields,
e.g.
fTextField: """" & [TextField] & """"
and then export it without adding quotes at that stage.

On Wed, 17 Dec 2003 06:12:53 -0800, "Chris"

I am trying to export a table to a comma delimited text
file. When the export is complete I notice that number
fields that have been formatted to display 4 decimal
places are truncated when I export the file.

Implemeting the solution offered by Microsoft "Microsoft
Knowledge Base Article - 208408" seems to convert my
number fields into text objects during export.

What I am trying to accomplish is create a text data file
that ONLY encloses my text fields with quotes. This is
the case when I export my table, but the truncation
problem changes my data as in the following example:
"A0A 1B0","AVONDALE","NL",47.41,53.19

The last two fields should be formatted to 4 decimal
places (as they are in my original table).

Creating a query and formatting the number fields to four
places, exports the data to four places but encloses the
fields in quotes as:
"A0A 1B0","AVONDALE","NL","53.1975","47.4162"

What I need is the data file to export the number fields
as numbers NOT characters as;
"A0A 1B0","AVONDALE","NL",53.1975,47.4162

How can this be accomplished???
Thanks,
Chris

Your suggestion seems to add quotes. My situation
requires that I export the decimal fields WITHOUT quotes.
In fact I am already using a format to create the
required number: Format([number_field],"0.0000")

Respectfully,
Chris

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 
Back
Top