Insert decimal after first 5 characters

  • Thread starter Thread starter Barbara Brenner
  • Start date Start date
B

Barbara Brenner

I have a 7-character field of numbers. The number is supposed to have the
last 2 digits as a sub-number with a period separating it from the first 5
numbers. So I want to change numbers such as 1234567 to 12345.67


Can you help me?

Thanks,
Barbara
 
If the number is truely a number then divide it by 100. That will shift the
decimal two places to the left.

If the number is really text, then use something like the following in an
update query.

Left([fieldname],5) & "." & Right([Fieldname],2)


--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
The concept of a sub-number implies that those two digits have some
significant meaning, and should probably actually be stored as a
separate field in you database. If you forsee that you would ever
want to run a query based on the last two characters in this field,
then I would strongly suggest that you put them in a field of their
own.

--
HTH

Dale Fye


I have a 7-character field of numbers. The number is supposed to have
the
last 2 digits as a sub-number with a period separating it from the
first 5
numbers. So I want to change numbers such as 1234567 to 12345.67


Can you help me?

Thanks,
Barbara
 
Worked like a gem. Thanks!


[MVP] S. Clark said:
If the number is truely a number then divide it by 100. That will shift the
decimal two places to the left.

If the number is really text, then use something like the following in an
update query.

Left([fieldname],5) & "." & Right([Fieldname],2)


--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Barbara Brenner said:
I have a 7-character field of numbers. The number is supposed to have the
last 2 digits as a sub-number with a period separating it from the first 5
numbers. So I want to change numbers such as 1234567 to 12345.67


Can you help me?

Thanks,
Barbara
 
Back
Top