By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,341 Members | 1,553 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,341 IT Pros & Developers. It's quick & easy.

Fixed width export strips leading zeros...bad

P: n/a
I run a fixed-width export based on a query, and the query looks like
this...

Clients.SSN, Clients.ClientID, ServiceEvents.SeviceDate,
CStr(Format([ServiceEvents.Unit],"0000")) AS Servs, "28" AS SETTING,
FROM Clients INNER JOIN ServiceEvents ON
Clients.AutoID=ServiceEvents.AutoID
WHERE ServiceEvents.Sub=False;

Now, this looks fine when I few the query, and the "Unit" field is 4
characters, with leading zeros. The export spec I use also assigns
the field 4 spaces. When I actually export though, there are no more
leading zeros, and everything is left justified. If this was a CSV,
I'd understand Access's stupid compulsion to strip these zeros, but
it's not. I've looked all over this group and have no been able to
find anything that works, plus it's all from nearly 4 years ago. Is
there anything new in Access 2002 that just hasn't been mentioned yet?

Thanks,
Andrew
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I also wanted to add that the format of the "Unit" field is text.
"Andrew" <sp****@gnt.net> wrote in message
news:d8**************************@posting.google.c om...
I run a fixed-width export based on a query, and the query looks like
this...

Clients.SSN, Clients.ClientID, ServiceEvents.SeviceDate,
CStr(Format([ServiceEvents.Unit],"0000")) AS Servs, "28" AS SETTING,
FROM Clients INNER JOIN ServiceEvents ON
Clients.AutoID=ServiceEvents.AutoID
WHERE ServiceEvents.Sub=False;

Now, this looks fine when I few the query, and the "Unit" field is 4
characters, with leading zeros. The export spec I use also assigns
the field 4 spaces. When I actually export though, there are no more
leading zeros, and everything is left justified. If this was a CSV,
I'd understand Access's stupid compulsion to strip these zeros, but
it's not. I've looked all over this group and have no been able to
find anything that works, plus it's all from nearly 4 years ago. Is
there anything new in Access 2002 that just hasn't been mentioned yet?

Thanks,
Andrew

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.