cleaning data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

What code can I use to delete commas, hyphen, slashes etc. from a field and leave the data clean - update the data without all the unnecessary non-alpha numeric characters?
 
Okay, let's say you have a field Cust.Name that you want to clean

UPDATE Cust
SET Cust.Name = Replace(Replace(Cust.Name, ",", ""), " ", ""


That would take care of commas and spaces in the name field. You can nest the function more times if there are more characters to be cleaned

Regards

Frank M

----- johnduran wrote: ----

How would I use that within an update query?
 
What code can I use to delete commas, hyphen, slashes etc. from a field and leave the data clean - update the data without all the unnecessary non-alpha numeric characters?

Answered in modulesdaovba. Please crosspost rather than multiposting!
 
Back
Top