Skip to main content
September 15, 2007
Question

integer with leading zeros

  • September 15, 2007
  • 1 reply
  • 572 views
i have an msAccess db that i need to move over to msSQL2000 and a numeric field of part numbers always has 5 digits: example: 12345, 01234, 00123....

in msAccess the field data type is "number" with a format of "00000" which maintains leading zeros.

problem is that i cannot figure out to create an equivilant numeric field that maintains leading zeros in msSQL2000. would prefer not to use "char"

thanks in advance
This topic has been closed for replies.

1 reply

Inspiring
September 16, 2007
ranger wrote:
> in msAccess the field data type is "number" with a format of "00000" which
> maintains leading zeros.

no, it only displays it that way.

> problem is that i cannot figure out to create an equivilant numeric field that
> maintains leading zeros in msSQL2000. would prefer not to use "char"

you can't. either you format on the fly in sql server (complicated) or you
format (numberFormat(), etc.) it in cf.