Update Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to update a column in a table to equal 10 characters long. If the
field is less than 10 characters I need to add zeros to the right of the
value in the field. For example:
Column A Row 1 includes the following value:
123456
I would update this value so that it looks like this:
0000123456

I believe I can use an embedded iif statement to meet these requirements.
However, don't know what the iif statement would look like. Could someone
help, thank you.
 
"add zeros to the right" - "0000123456"?

You might be able to update to
Right("0000000000" & [YourField],10)
 
Thank you very much

Duane Hookom said:
"add zeros to the right" - "0000123456"?

You might be able to update to
Right("0000000000" & [YourField],10)

--
Duane Hookom
MS Access MVP


David Rivera said:
I need to update a column in a table to equal 10 characters long. If the
field is less than 10 characters I need to add zeros to the right of the
value in the field. For example:
Column A Row 1 includes the following value:
123456
I would update this value so that it looks like this:
0000123456

I believe I can use an embedded iif statement to meet these requirements.
However, don't know what the iif statement would look like. Could someone
help, thank you.
 
Back
Top