473,387 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Export

Everyone,

I'm trying to export a table containing numeric fields with formats
such as "00000000" which would return the value with some leading
zeros. It works fine in the table as it is displayed as I want, the
problem is that I lose the formats when I try to export the table to a
TXT file; e.g. in the table the numeric field is displayed as 00034569
but it exports as 34569.

I know I can convert the numeric field to "Text" with the appropriate
formatting and that way they would export with the leading zeros, but
the problem is that I need them to be "Numeric" as when exporting to
the TXT (Fixed Width) file I need the "Numeric" fields to be aligned to
the right, don't ask why because I don't know or can do anything
about it.

Any help would be highly appreciated.
Thanks
GAVO.

Mar 2 '06 #1
1 1566
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Use a query to export the data. In the query use the Format() function
to add leading zeros to the "numeric" data:

SELECT Format(number_column,"00000000"), ...

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBRAdK0oechKqOuFEgEQILlwCg5hVaVE0K/kF+JjypGTJybCaNn9cAn3fb
lDkcbqoJgkT9VOiB3CjKNrEK
=C8Eq
-----END PGP SIGNATURE-----
ANDRESUK wrote:
Everyone,

I'm trying to export a table containing numeric fields with formats
such as "00000000" which would return the value with some leading
zeros. It works fine in the table as it is displayed as I want, the
problem is that I lose the formats when I try to export the table to a
TXT file; e.g. in the table the numeric field is displayed as 00034569
but it exports as 34569.

I know I can convert the numeric field to "Text" with the appropriate
formatting and that way they would export with the leading zeros, but
the problem is that I need them to be "Numeric" as when exporting to
the TXT (Fixed Width) file I need the "Numeric" fields to be aligned to
the right, don't ask why because I don't know or can do anything
about it.

Mar 2 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: DarkSpy | last post by:
many c++ compilers including "gcc" have not implemented the "export" keyword, but the comeau compilers made it (just i knew). i want to know about: is it too difficult to implement "export"...
205
by: Jeremy Siek | last post by:
CALL FOR PAPERS/PARTICIPATION C++, Boost, and the Future of C++ Libraries Workshop at OOPSLA October 24-28, 2004 Vancouver, British Columbia, Canada http://tinyurl.com/4n5pf Submissions
1
by: Do Park via SQLMonster.com | last post by:
Hello all, I don?t often export data from a table. I am wondering how you export data from a table. I?d like to know how you export in real world. Do you export data from a table to a flat...
6
by: maricel | last post by:
Is there anybody out there who have any idea why EXPORT is relatively slower when putting the output file on a network drive - map drive from onother PC compared to putting it on my local PC drive...
5
by: David | last post by:
I am a little confused by DB2 Backup and Export. I used "db2 backup db QAS to /dev/rmt0" backuping 650GB database to a IBM LTO 3581 (1 drive) only 11 hours. But I used "db2 export to /dev/rmt0...
5
by: Tim Eliot | last post by:
Just wondering if anyone has hit the following issue and how you might have sorted it out. I am using the command: DoCmd.TransferText acExportMerge, , stDataSource, stFileName, True after...
7
by: Pat | last post by:
I would like to send the Print Preview of a MS Access form to a Snapshot file. The form contains an OLE graph. BACKGROUND A snapshot of a report is possible. If I could I would use a report to...
1
by: chaitu | last post by:
Hi, Can anybody tell me what the error code for Export is. Like i get the message SQL3104N The Export utility is beginning to export data to file...
5
by: JHNielson | last post by:
I have a somewhat simple question, but have been baffled by it for a while, and now I'm on a tight deadline - have to get it done within 24 hours. I am trying to export a set of files to my hard...
8
by: iheartvba | last post by:
Hi I am using Access 2007 and am trying to export a query to a fixed length text file. I tried using the following code to export the text file: DoCmd.TransferText acExportFixed, , "qryFFRDeFile",...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.