A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Translating or changing a ^ to a comma



 
 
Thread Tools Display Modes
  #1  
Old December 17th, 2006, 10:50 PM posted to microsoft.public.access.forms
hkhella
external usenet poster
 
Posts: 14
Default Translating or changing a ^ to a comma

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?
  #2  
Old December 17th, 2006, 11:11 PM posted to microsoft.public.access.forms
'69 Camaro
external usenet poster
 
Posts: 1,049
Default Translating or changing a ^ to a comma

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/ex...ributors2.html for contact info.


"hkhella" wrote:

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?

  #3  
Old December 18th, 2006, 04:06 AM posted to microsoft.public.access.forms
Josh
external usenet poster
 
Posts: 17
Default Translating or changing a ^ to a comma

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.



On Sun, 17 Dec 2006 15:11:00 -0800, '69 Camaro
AM wrote:

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/ex...ributors2.html for contact info.


"hkhella" wrote:

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?


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:29 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.