Dropping the last character

N

Nyla K

How can I remove the last character? I have a table that lists account #s
followed by a comma. I need to remove the comma. For example: 123400, I
need the "," removed and the account #s can be anywhere from 1 to 11 digits
long.

I'm using the update query.

Thanks in advance for your assistance.

Nyla
 
J

John Spencer

UPDATE YourTable
SET YourField = Left([YourField], Len([YourField])-1)
WHERE YourField Like "*,"

OR

UPDATE YourTable
SET YourField = Replace([YourField], ",","")
WHERE YourField is not null


--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
N

Nyla K

This worked! Thank you, John.

Nyla

John Spencer said:
UPDATE YourTable
SET YourField = Left([YourField], Len([YourField])-1)
WHERE YourField Like "*,"

OR

UPDATE YourTable
SET YourField = Replace([YourField], ",","")
WHERE YourField is not null


--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Nyla K said:
How can I remove the last character? I have a table that lists account #s
followed by a comma. I need to remove the comma. For example: 123400,
I
need the "," removed and the account #s can be anywhere from 1 to 11
digits
long.

I'm using the update query.

Thanks in advance for your assistance.

Nyla
 
Top