Inserting a decimal point int a text field

  • Thread starter Thread starter Steis
  • Start date Start date
S

Steis

I have a text field that I need to insert a decimal point
into. The text field values are really numbers that I need
to input a decimal point into. I tried table design on
that field and put in a format and/or input mask but I
can't get it to come out right. Ex value is 3485 and I
need it to be stored as 348.5 Thanks!
 
Ex value is 3485 and I
need it to be stored as 348.5

UPDATE MyTable
SET NewTextField = Left(OldTextField,3) & "." & Right(OldTextField,1)
WHERE Len(OldTextField)=4

or, an alternative

UPDATE MyTable
SET NewTextField = Format(CDbl(OldTextField)/10,"000.0")
WHERE IsNumeric(OldTextField)

(I'm not too sure about the IsNumeric function -- you may have to
experiment a bit there.. )


Hope that helps

Tim F
 
Back
Top