tags:

views:

27

answers:

1

Hi,

I have a Microsoft Access database. In the database, there is a table, say 'MyTable'. In MyTable, there is a column, say 'MyColumn'. Its type is Text. Some data in this column have several space characters at their end, so I want to trim them. I ran the command below

UPDATE MyTable SET MyColumn = trim(MyColumn)

The command was executed successfully, but I see no change. The data with space suffix are still there. Why?

Many thanks in advance,

Haris

A: 

One option is that you have a fixed-length field (which can be created programmatically). Another is that your spaces aren't true spaces but other characters (NBSP for instance) which just 'look' like spaces.

Tobiasopdenbrouw
How to remove these space-like characters then?
Haris
Remou
Yes. 160 is another one, I think.
Tobiasopdenbrouw
Also see http://stackoverflow.com/questions/52315/t-sql-trim-nbsp-and-other-non-alphanumeric-characters
Tobiasopdenbrouw
You can find out the character that is at the end of the field with Asc(Right(MyColumn, 1)).
David-W-Fenton