[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
Solved

# How do I add a 0 to the end of a value in a field?

Posted on 2005-05-11
Medium Priority
247 Views
I have a field (int), and I would like to add a zero to every value in that field?  How could I do this update.  What would the qry look like?
0
Question by:indy500fan
• 2
• 2
• 2
• +1

LVL 28

Expert Comment

ID: 13980897
UPDATE YourTable
SET YourColumn = 0
0

LVL 1

Accepted Solution

Don Smith earned 2000 total points
ID: 13980898
Why not just multiply it by ten?

e.g. update mytable set fld1 = fld1 * 10
0

LVL 28

Expert Comment

ID: 13980904
or

UPDATE YourTable
SET YourColumn = YourColumn * 10
0

LVL 6

Expert Comment

ID: 13980914
by adding a zero do you mean 1 + 0 = 1 or 1 add 0 = 10?

if the former:

Update yourTable SET
field = field + 0

if the latter:

Update yourTable SET
field = field * 10
0

LVL 6

Expert Comment

ID: 13980922
doh! ra quick on the draw! ;)
0

Author Comment

ID: 13981077
I mean, I have the integer 40423434 and I want it to be changed to 404234340

Does that make sense?  I think that smithsys has it.  If you multiplied 40423434 by 10, you would get 40423434, thereby updating the value.

Thanks!

Eric
0

Author Comment

ID: 13981292
Thanks for all your help.  Wow you guys under the DB forum are FAST!!!!
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question