Remove a square control character

  • Thread starter Thread starter Ali
  • Start date Start date
A

Ali

Access 2003

I have imported a delimited text file in to a table. in one of the fields
there appears to be a square control character at the end of the valid text.

How can I get rid of this?
 
Ali said:
Access 2003

I have imported a delimited text file in to a table. in one of the fields
there appears to be a square control character at the end of the valid text.

How can I get rid of this?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You can just Update it like this:

UPDATE table_name
SET column_name = Left(column_name, Len(column_name)-1)
WHERE < criteria that identifies the row w/ the square character >

Substitute your table and column names for "table_name" and
"column_name," respectively.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQi4e5YechKqOuFEgEQKwAgCfU6yst+QGLu5SnqMbe0gWAt9g86YAoIr4
6qj9UXdMWUhsfoNigZ8EJtUu
=S1kv
-----END PGP SIGNATURE-----
 
Thanks but not every record has the control character and there are over
70000 records
Is there a way of testing the last character to see if it is the offending
one and then get rid of it?
 
Ali said:
Thanks but not every record has the control character and there are over
70000 records
Is there a way of testing the last character to see if it is the offending
one and then get rid of it?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

If you read my post more carefully you'd see the WHERE clause was
"asking" you for the criteria that would define the row where the square
character is:

WHERE < criteria that identifies the row w/ the square character >

Since you didn't post that information, you will have to enter that
criteria yourself.

If it's just one cell that has that character:

Highlight the complete contents of the cell & copy.
Paste into an open Notepad.
Delete the square character.
Copy the string and past back into the table's cell.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQi4jLIechKqOuFEgEQL0mgCgssfvc9XUsdCbw0h4P9Os2vRihxUAoPOM
/PsYJkDoKWh5dmbceBpn4X5Y
=XeeC
-----END PGP SIGNATURE-----
 
IIf(Right([MyString], 1) = "]", Left([MyString], Len([MyString]) - 1),
[MyString])

Tom Lake
 
Thanks maybe I am asking the wrong question. I know I can update the
records my problem is how can I test for the control (square character) so I
know which records to update?
 
Thanks Tom - a slight change to the character and it works
Tom Lake said:
IIf(Right([MyString], 1) = "]", Left([MyString], Len([MyString]) - 1),
[MyString])

Tom Lake
 
Back
Top