I have a field which lists serial numbers, at the moment some are 4 digits long, some 5 etc... I would like to know how I can run a query that makes all the numbers 8 digits long please.
I'm presuming you're in access as you're referring to a query - you don't need to. Just change the format of the field in the table to 00000000 - whatever values you have in there will get 0's added to the front up to a max of 8 digits.
If you are in excel, use the REPT function
=REPT("0",8-LEN(A1))&A1 where your vlaue is in A1
HTH
Geoff
Thewishla - you should really say which one worked - and give it a star. I'm not fishing for stars but the protocol on this site is if a post has been helpful / informative, you should give a star. It also helps others see where helpful posts have been made, even if it is not for a question they have asked and denotes useful "locaters" for good information.
Again - please don't think I'm fishing here - If Mikey's post was the one you used, give it a star, esp. as your response was
Thanks works just as I need it
which means it obviously solved your problem
Rgds
Geoff
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.