How to delete astericks in my columns?

P

Peggy

I am using a data base that has astericks in every column before the
information. Is there a way to take all of them out without doing it one at
a time?
 
K

KARL DEWEY

If it is as you stated - astericks in every column before the information -
then use this to update AFTER BACKUP of database.
Right([YourFieldName], Len([YourFieldName])-1)
 
J

John Spencer

Use an update query and do one column at a time

UPDATE YourTable
SET [FieldA] = Mid([FieldA],2)
WHERE [FieldA] Like "[*]*"

If you have multiple asterisk then you will need to run the query multiple times.

If you want to remove ALL asterisks including any ones that embedded later in
the field value then you could use

UPDATE YourTable
SET [FieldA] = Replace([FieldA],"*","")
, [FieldB] = Replace([FieldB],"*","")
, [FieldC] = Replace([FieldC],"*","")
, [FieldD] = Replace([FieldD],"*","")

If you don't understand the above SQL, then post back for a step by step set
of instructions on how to do this in Query Design View instead of SQL view.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top