Link to home
Start Free TrialLog in
Avatar of donnie91910
donnie91910

asked on

Update field data with a 0 in the middle of the data.

For example this is how it looks now: 302859
I want it to look like: 3020859

Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of Sean Stuber
Sean Stuber

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 Sean Stuber
Sean Stuber

for numeric values...

int(yourfield/1000) * 10000 + mod(yourfield,1000)
Update your table
Set yourfield=left (Yourfield,Len(yourfield)/2) & "0" & right(yourfield,Len(youtfield)/2)
oops, my modulo syntax isn't correct for access

int(yourfield/1000) * 10000 + (yourfield mod 1000)

note,  I'm assuming your input will always be 6 digits here,  or 6 characters in my first post

if it will vary, then you'll need something like mbizup posted that tries to derive it from the string length
Avatar of donnie91910

ASKER

Like this?
Set [DO_9_DO].[Release]=left ([DO_9_DO].[Release],Len(Release)/2) & "0" & right([DO_9_DO].[Release],Len(Release)/2)
SOLUTION
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