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

SQL syntax - leading zeros

P: n/a
I have a Query I'm writing and have a problem:
I have an employee text field (not numeric) with typical values:

165461
050565
000542
653431
156334
etc.

When I run my query the leading zeros fall off.
I have to write the solution as a stand-alone query in Access 2000
query design.

I'm thinking something like:

SELECT Employees.GovID
FROM Employees

FORMAT? Format$"000000" ? Format GovID "000000"

Thanks in Advance.... Brian

Jan 5 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Red
I -had- a similar problem with a zip code thing I was working on... is
there a reason why you can't change the field to a numeric field?

Jan 5 '06 #2

P: n/a
It's an ADP purchased software which changing the data type would
affect numerous other functions.

Jan 5 '06 #3

P: n/a
campbellbrian2...@yahoo.com wrote:
It's an ADP purchased software


Arghhhhhhh! My Heart! My Heart!

Arghhhhhhh ......!

Jan 5 '06 #4

P: n/a
I'm not local to the user's PC needing this, but how would this work?:

SELECT Format([SomeField], "000000") AS NewNameSomeField
FROM......

Jan 6 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.