Kissi Asiedu wrote:
Quote:
I need to delete the last character in a field. Can somone help with a
query or SQL statement please? |
Let's say you had a table called Emps and a field called LastName, 1
record, and had a value of Smith. You could create a column called
Minus1Char to return Smit to see how that works.
In the query builder enter
Minus1Char : Left([LastName],Len(LastName)-1)
Len returns the length of a string. Subtract 1 from that value. Now
get the n number of chars starting from the beginning of the string to
the length value using the function Left()
To update the value of the field LastName in table Emps you'd use an
update query.
UPDATE Emps SET LastName = Left([LastName],Len([LastName])-1);