Adding Characters

L

Lin Light

I need to import over 500 records into a database and one key data field
needs the same work done on each record. I need to add an * and change
a lower case b to capital B and end with an *. For example b19801750
becomes *B19801750*. Any ideas as how to do this after the data comes
in. It could be done in a query. Now it is already in Excel, so if anyone
knows of a way to do it in
Excel, that would be cool too.
Lin
 
6

'69 Camaro

Hi.
I need to add an * and change
a lower case b to capital B and end with an *. For example b19801750
becomes *B19801750*.

It would be easiest to use an update query instead of trying to change the
data in an Excel spreadsheet (as you've found out when you posted this
question in the Excel forum). If you feel a need to ask the same question in
multiple newsgroups, then please add the name of each newsgroup when you post
the single question. That way multiple people won't answer the same question
that's already been answered, because everyone can see the other readers'
answers.

If your table is named MyTable and the column that needs to be changed is
named Code, then the following UPDATE query would make the necessary changes:

UPDATE MyTable
SET Code = "*" & UCase(Mid(Code, 1, 1)) & Mid(Code, 2) & "*";

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)

- - -
When you see correct answers to your question posted in Microsoft's Online
Community, please sign in to the Community and mark these posts as "Answers,"
so that all may benefit by filtering on "Answered questions" and quickly
finding the right answers to similar questions. (Only "Answers" have green
check-marks.) Remember that the best answers are often given to those who
have a history of rewarding the contributors who have taken the time to
answer questions correctly.
 
Top