Exporting from Access 2002

  • Thread starter Thread starter C Ramdathsingh
  • Start date Start date
C

C Ramdathsingh

When I export an Access 2002 table to text where the
numbers in the Access table have more than two decimal
places, I only get two decimal places in the text file.
How can I get more decimal places in the exported text
file?
 
Hi Colin,

Create a query that returns the data you want to export. To format
numeric or date/time fields, use the Format() function in calculated
fields in the query, e.g.

fNumberField: Format([NumberField], "0.0000")
 
Thanks John,

I used your suggestion in a test table (with 4 or 5
columns) and it worked. However when I tried it in the
actual table (I am trying to keep 4 decimal places in the
14th, 15th and 16th fields) no success. Are there any
rules or limits on number of columns, amount of data in
table, fieldwidth in the export file? Or can you suggest
anything else that I may be doing wrong?

Colin

-----Original Message-----
Hi Colin,

Create a query that returns the data you want to export. To format
numeric or date/time fields, use the Format() function in calculated
fields in the query, e.g.

fNumberField: Format([NumberField], "0.0000")


When I export an Access 2002 table to text where the
numbers in the Access table have more than two decimal
places, I only get two decimal places in the text file.
How can I get more decimal places in the exported text
file?

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 
Colin,

When you say "no success", what actually happens? Please post the SQL of
the query that doesn't work the way you expect.

Thanks John,

I used your suggestion in a test table (with 4 or 5
columns) and it worked. However when I tried it in the
actual table (I am trying to keep 4 decimal places in the
14th, 15th and 16th fields) no success. Are there any
rules or limits on number of columns, amount of data in
table, fieldwidth in the export file? Or can you suggest
anything else that I may be doing wrong?

Colin

-----Original Message-----
Hi Colin,

Create a query that returns the data you want to export. To format
numeric or date/time fields, use the Format() function in calculated
fields in the query, e.g.

fNumberField: Format([NumberField], "0.0000")


When I export an Access 2002 table to text where the
numbers in the Access table have more than two decimal
places, I only get two decimal places in the text file.
How can I get more decimal places in the exported text
file?

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 
Hi John,

By "no success" I meant that although the query produced
the data formatted to 4 decimal places, the export to
text still gave me 2 decimal places when I used the
actual table. When I used the smaller test table (fewer
columns), both the query and the export worked to produce
the 4 decimal places.

I am using a saved Export Specification. I have finally
been able to produce 4 decimal places in the exported
text file by reducing the size of the fields in the
Export Specification from 22 to 18 characters. I did not
change anything in the query (so I have not posted the
SQL).

Are there any limits on the field size or line length in
the exported text file? I have reduced the line length
from 395 to 383.

Colin
-----Original Message-----
Colin,

When you say "no success", what actually happens? Please post the SQL of
the query that doesn't work the way you expect.

Thanks John,

I used your suggestion in a test table (with 4 or 5
columns) and it worked. However when I tried it in the
actual table (I am trying to keep 4 decimal places in the
14th, 15th and 16th fields) no success. Are there any
rules or limits on number of columns, amount of data in
table, fieldwidth in the export file? Or can you suggest
anything else that I may be doing wrong?

Colin

-----Original Message-----
Hi Colin,

Create a query that returns the data you want to
export.
To format
numeric or date/time fields, use the Format() function in calculated
fields in the query, e.g.

fNumberField: Format([NumberField], "0.0000")


On Tue, 30 Sep 2003 06:27:10 -0700, "C Ramdathsingh"

When I export an Access 2002 table to text where the
numbers in the Access table have more than two decimal
places, I only get two decimal places in the text file.
How can I get more decimal places in the exported text
file?

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 
IIRC, the limit is 2000 bytes per exported record.

--
Ken Snell
<MS ACCESS MVP>

Colin said:
Hi John,

By "no success" I meant that although the query produced
the data formatted to 4 decimal places, the export to
text still gave me 2 decimal places when I used the
actual table. When I used the smaller test table (fewer
columns), both the query and the export worked to produce
the 4 decimal places.

I am using a saved Export Specification. I have finally
been able to produce 4 decimal places in the exported
text file by reducing the size of the fields in the
Export Specification from 22 to 18 characters. I did not
change anything in the query (so I have not posted the
SQL).

Are there any limits on the field size or line length in
the exported text file? I have reduced the line length
from 395 to 383.

Colin
-----Original Message-----
Colin,

When you say "no success", what actually happens? Please post the SQL of
the query that doesn't work the way you expect.

Thanks John,

I used your suggestion in a test table (with 4 or 5
columns) and it worked. However when I tried it in the
actual table (I am trying to keep 4 decimal places in the
14th, 15th and 16th fields) no success. Are there any
rules or limits on number of columns, amount of data in
table, fieldwidth in the export file? Or can you suggest
anything else that I may be doing wrong?

Colin


-----Original Message-----
Hi Colin,

Create a query that returns the data you want to export.
To format
numeric or date/time fields, use the Format() function
in calculated
fields in the query, e.g.

fNumberField: Format([NumberField], "0.0000")


On Tue, 30 Sep 2003 06:27:10 -0700, "C Ramdathsingh"

When I export an Access 2002 table to text where the
numbers in the Access table have more than two decimal
places, I only get two decimal places in the text file.
How can I get more decimal places in the exported text
file?

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 
Hi Colin,

Exporting fields longer than 255 characters to textfiles can be tricky,
but that's the only field length limit. There is a limit on line length
in TransferText but I don't know what it is; Ken's 2000 characters may
be right.

If you need full control over what's exported, forget about
TransferText. Instead, open a recordset on your query and use VBA code
to iterate through the recordset building up a string containing one
line of the output file, and write this to disk (using the old Open,
Print # and Close file i/o statements or the new FileSystemObject
object).

I can't reproduce this behaviour on my own system. If you post the SQL
of your query I might be able to spot the problem.

Hi John,

By "no success" I meant that although the query produced
the data formatted to 4 decimal places, the export to
text still gave me 2 decimal places when I used the
actual table. When I used the smaller test table (fewer
columns), both the query and the export worked to produce
the 4 decimal places.

I am using a saved Export Specification. I have finally
been able to produce 4 decimal places in the exported
text file by reducing the size of the fields in the
Export Specification from 22 to 18 characters. I did not
change anything in the query (so I have not posted the
SQL).

Are there any limits on the field size or line length in
the exported text file? I have reduced the line length
from 395 to 383.

Colin
-----Original Message-----
Colin,

When you say "no success", what actually happens? Please post the SQL of
the query that doesn't work the way you expect.

Thanks John,

I used your suggestion in a test table (with 4 or 5
columns) and it worked. However when I tried it in the
actual table (I am trying to keep 4 decimal places in the
14th, 15th and 16th fields) no success. Are there any
rules or limits on number of columns, amount of data in
table, fieldwidth in the export file? Or can you suggest
anything else that I may be doing wrong?

Colin


-----Original Message-----
Hi Colin,

Create a query that returns the data you want to export.
To format
numeric or date/time fields, use the Format() function
in calculated
fields in the query, e.g.

fNumberField: Format([NumberField], "0.0000")


On Tue, 30 Sep 2003 06:27:10 -0700, "C Ramdathsingh"

When I export an Access 2002 table to text where the
numbers in the Access table have more than two decimal
places, I only get two decimal places in the text file.
How can I get more decimal places in the exported text
file?

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.

--
John Nurick [Microsoft Access MVP]

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