Translating or changing a ^ to a comma

H

hkhella

I have a field that is imported from a text file. The data arrives with the
^ seperating the last from the first name. I would like to change the ^ to a
comma. Can someone please assist?
 
6

'69 Camaro

Hi.
I would like to change the ^ to a
comma.

Use an UPDATE query to change this in all the records. Make a backup of
your table first, in case something goes wrong.

Create a new query (select your table name in the Database Window, then
select the Insert -> Query menu, then the "OK" button, then select the View
-> SQL View menu). Paste the following into the SQL View pane:

UPDATE tblNames
SET FullName = REPLACE (FullName, "^", ",", 1);

Change the table name, tblNames, to your table's name, and change the column
name, FullName, to your column's name. Run the query.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact info.
 
J

Josh

I was going to tell the OP just use Find/Replace on the Edit menu, searching for
^ and replacing with ", " (comma, one space).

However, your solution is I'm sure better, plus exposes the OP to an update
query.
 
Top