Dropping the last character

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

Guest

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
 
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
..
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top