Connecting Tech Pros Worldwide Help | Site Map

acExportDelim With Leading Zeros

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 12th, 2005, 06:10 PM
Clint Stowers
Guest
 
Posts: n/a
Default acExportDelim With Leading Zeros

Using A2k

Exporting a query to a CSV file. The problem is any text fields (i.e. 000345)
lose any leading zeros.

Exporting to an excel file this problem does not exist.

Tried to create a SpecificationName via the Export Wizard without success.
Obviously doing something wrong.

Any suggestions appreciated. Thanks in advance.




"And.... Exactly at which point did you consider this a good idea?"

  #2  
Old November 12th, 2005, 06:10 PM
Trevor Best
Guest
 
Posts: n/a
Default Re: acExportDelim With Leading Zeros

On 16 Jan 2004 02:28:11 GMT in comp.databases.ms-access,
clint2001@aol.comNoSpam (Clint Stowers) wrote:
[color=blue]
>Using A2k
>
>Exporting a query to a CSV file. The problem is any text fields (i.e. 000345)
>lose any leading zeros.
>
>Exporting to an excel file this problem does not exist.
>
>Tried to create a SpecificationName via the Export Wizard without success.
>Obviously doing something wrong.
>
>Any suggestions appreciated. Thanks in advance.[/color]

You need to create a query, the formatted field should be in the grid
as something like:

Aliasname: Format(FieldName,"000000")

Then export the query.

--
A)bort, R)etry, I)nfluence with large hammer.
  #3  
Old November 12th, 2005, 06:11 PM
Clint Stowers
Guest
 
Posts: n/a
Default Re: acExportDelim With Leading Zeros


Have taken the query that has a field "SalesOrder" (sample:000123) and in the
same query created field "NewSalesOrder: Format([SalesOrder],"000000").

When I export this query using acExportDelim fields fail to maintain the
leading zeros.

Any thoughts?





"And.... Exactly at which point did you consider this a good idea?"
  #4  
Old November 12th, 2005, 06:11 PM
Trevor Best
Guest
 
Posts: n/a
Default Re: acExportDelim With Leading Zeros

On 16 Jan 2004 15:48:12 GMT in comp.databases.ms-access,
clint2001@aol.comNoSpam (Clint Stowers) wrote:
[color=blue]
>
>Have taken the query that has a field "SalesOrder" (sample:000123) and in the
>same query created field "NewSalesOrder: Format([SalesOrder],"000000").
>
>When I export this query using acExportDelim fields fail to maintain the
>leading zeros.
>
>Any thoughts?[/color]

Do you have an export specification in place that is still treating
this column as numeric?

--
A)bort, R)etry, I)nfluence with large hammer.
  #5  
Old November 12th, 2005, 06:11 PM
Clint Stowers
Guest
 
Posts: n/a
Default Re: acExportDelim With Leading Zeros

In article <g0hg00lls8v0ue5680qbloj786ojcioc74@4ax.com>, Trevor Best
<bouncer@localhost> writes:
[color=blue]
>Do you have an export specification in place that is still treating
>this column as numeric?[/color]

I removed the SpecificationName just in case. Leading zeros in both the
orignal field and the formated field were removed.

However I found this to be the case when exporting to "MyFile.csv". When
exported to "MyFile.txt", both field maintain the leading zeros.

Currently checking to see if the software being export to will axcept an "txt"
extention. The text file should survice in that the data contains no true
numeric data. Just account and zipcodes. So I this point there may be no need
to reinvent the wheel.

Althought it would be nice to know why I can't place the leading zeros in the
"cvs" file.





"And.... Exactly at which point did you consider this a good idea?"
  #6  
Old November 12th, 2005, 06:11 PM
Trevor Best
Guest
 
Posts: n/a
Default Re: acExportDelim With Leading Zeros

On 16 Jan 2004 21:46:43 GMT in comp.databases.ms-access,
clint2001@aol.comNoSpam (Clint Stowers) wrote:
[color=blue]
>In article <g0hg00lls8v0ue5680qbloj786ojcioc74@4ax.com>, Trevor Best
><bouncer@localhost> writes:
>[color=green]
>>Do you have an export specification in place that is still treating
>>this column as numeric?[/color]
>
> I removed the SpecificationName just in case. Leading zeros in both the
>orignal field and the formated field were removed.
>
>However I found this to be the case when exporting to "MyFile.csv". When
>exported to "MyFile.txt", both field maintain the leading zeros.
>
>Currently checking to see if the software being export to will axcept an "txt"
>extention. The text file should survice in that the data contains no true
>numeric data. Just account and zipcodes. So I this point there may be no need
>to reinvent the wheel.
>
>Althought it would be nice to know why I can't place the leading zeros in the
>"cvs" file.[/color]

I don't know if it has anything to do with Excel being the registered
application for opening .csv files but it has to be said, Excel is a
pile of poo when it comes to handling data. Only the other day I was
exporting data to Excel, which consisted mostly of dates. Being in the
UK all my settings are UK, including dates (dd/mm/yyyy) even so, Excel
would only treat the dates that were valid in US format (e.g.
03/04/2004) as dates and right aligned, all others (e.g. 13/01/2004)
were treated as text and left aligned.

--
A)bort, R)etry, I)nfluence with large hammer.
  #7  
Old November 12th, 2005, 06:12 PM
Clint Stowers
Guest
 
Posts: n/a
Default Re: acExportDelim With Leading Zeros

In article <smug009il6ptohpsfvmqk7eehhp25gumie@4ax.com>, Trevor Best
<bouncer@localhost> writes:
[color=blue]
>I don't know if it has anything to do with Excel being the registered
>application for opening .csv files but it has to be said, Excel is a
>pile of poo when it comes to handling data.[/color]

What is being created is just an intermidiate file to be wused between two
external software applications. I don't believe Excel is at issue at the
moment. I origionally exported the data to an excel file without ill affect,
then asked to make it a cvs file.

But due to what has previously been mentioned a "txt" file should survice. And
due to skill level may have to survice. At least for the moment.





"And.... Exactly at which point did you consider this a good idea?"
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.