Link to home
Start Free TrialLog in
Avatar of parkcityit
parkcityit

asked on

Add digit to a number

I have a field with an 18 digit number.  I need to add a 0 in the 9th digit making it a 19 digit number.

Example:
111111111111111111
becomes
1111111101111111111

Is there an easy way to do this with a SQL update query?
Avatar of dmitryz6
dmitryz6

left([Yourfield],8) & "0" & mid([Yourfield],9)
Avatar of Jim Horn
MyNewNumber = left(CStr(MyOldNumber, 8)) & "0" & right(CStr(MyOldNumber, 10))

Is this value stored in a table.column that is Text or numeric?
ASKER CERTIFIED SOLUTION
Avatar of dmitryz6
dmitryz6

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of parkcityit

ASKER

That was ridiculously fast.
You welcome